import type { ASTNodeKind, BetterSqlite3Database, Definition, TreeSitterNode } from '../types.js';
export declare const AST_NODE_KINDS: ASTNodeKind[];
interface FileSymbols {
    definitions: Definition[];
    calls?: Array<{
        line: number;
        name: string;
        dynamic?: boolean;
        receiver?: string;
    }>;
    astNodes?: Array<{
        line: number;
        kind: string;
        name: string;
        text?: string;
        receiver?: string;
    }>;
    _tree?: {
        rootNode: TreeSitterNode;
    };
    _langId?: string;
}
interface NativeDbHandle {
    bulkInsertAstNodes(batches: Array<{
        file: string;
        nodes: Array<{
            line: number;
            kind: string;
            name: string;
            text?: string | null;
            receiver?: string | null;
        }>;
    }>): number;
}
interface EngineOpts {
    nativeDb?: NativeDbHandle;
    suspendJsDb?: () => void;
    resumeJsDb?: () => void;
}
export declare function buildAstNodes(db: BetterSqlite3Database, fileSymbols: Map<string, FileSymbols>, _rootDir: string, engineOpts?: EngineOpts): Promise<void>;
interface AstQueryResult {
    kind: string;
    name: string;
    file: string;
    line: number;
    text: string | null;
    receiver: string | null;
    parent: {
        name: string | null;
        kind: string | null;
        file: string | null;
    } | null;
}
interface AstQueryOpts {
    kind?: string;
    file?: string | string[];
    noTests?: boolean;
    limit?: number;
    offset?: number;
    json?: boolean;
    ndjson?: boolean;
}
export declare function astQueryData(pattern: string | undefined, customDbPath: string | undefined, opts?: AstQueryOpts): {
    pattern: string;
    kind: string | null;
    count: number;
    results: AstQueryResult[];
    _pagination?: {
        hasMore: boolean;
        total: number;
        offset: number;
        returned: number;
        limit: number;
    };
};
export declare function astQuery(pattern: string | undefined, customDbPath: string | undefined, opts?: AstQueryOpts): void;
export {};
//# sourceMappingURL=ast.d.ts.map