Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
TypeScript
import type { FsAncestor } from 'claude-code'
/**
* One instruction file a walk found.
*
* @param dir the directory the file stands in
* @param name the file's name as the walk asked for it
* @param content the file's text
* @returns the found file
*/
export const ancestorOf = (
dir: string,
name: string,
content: string,
): FsAncestor => ({
dir,
name,
content,
parts: [{ path: `${dir}/${name}`, content }],
})