UNPKG

hataraku

Version:

An autonomous coding agent for building AI-powered development tools. The name "Hataraku" (働く) means "to work" in Japanese.

73 lines (72 loc) 2.6 kB
/** * Interface representing an exported function */ export interface ExportedFunction { name: string; filePath: string; signature: string; isDefault: boolean; documentation?: string; } /** * Interface representing an exported item (could be a function, class, variable, etc.) */ export interface ExportedItem { name: string; kind: string; filePath: string; isDefault: boolean; documentation?: string; } /** * Interface representing a re-exported item with its source chain */ export interface NestedExportedItem { name: string; filePath: string; originalSource?: string; originalName?: string; isDefault?: boolean; documentation?: string; } /** * Finds all exported functions in a TypeScript/JavaScript file * @param filePath Path to the file to analyze * @returns Array of exported functions */ export declare function findExportsInFile(filePath: string): ExportedFunction[]; /** * Finds all exported functions in a directory * @param directory Directory to search in * @param pattern Glob pattern for files to include (default: **\/*.{ts,js}) * @returns Array of exported functions */ export declare function findExportsInDirectory(directory: string, pattern?: string): ExportedFunction[]; /** * Finds all exported items (functions, classes, variables, etc.) in a file * @param filePath Path to the file to analyze * @returns Array of exported items */ export declare function findAllExportsInFile(filePath: string): ExportedItem[]; /** * Finds all exported items in a directory * @param directory Directory to search in * @param pattern Glob pattern for files to include (default: **\/*.{ts,js}) * @returns Array of exported items */ export declare function findAllExportsInDirectory(directory: string, pattern?: string): ExportedItem[]; /** * Recursively follow re-export chains to find the original source * @param filePath Path to the file to analyze * @param maxDepth Maximum recursion depth (default: 10) * @param visited Set of already visited files to prevent circular dependencies * @returns Array of nested exported items */ export declare function findNestedExports(filePath: string, maxDepth?: number, visited?: Set<string>): Promise<NestedExportedItem[]>; /** * Finds all nested exports in a directory * @param directory Directory to search in * @param pattern Glob pattern for files to include (default: **\/*.{ts,js}) * @returns Array of nested exported items */ export declare function findNestedExportsInDirectory(directory: string, pattern?: string): Promise<NestedExportedItem[]>;