import type { ASTRule } from '../types.js'; import { type LanguageType, type Tree, type Query } from './parser.js'; export interface ASTMatch { /** Named captures from the query */ captures: Map; /** Line number (1-indexed) */ line: number; /** Column number (1-indexed) */ column: number; /** The matched text (truncated for display) */ text: string; /** The rule that matched */ ruleId: string; } /** * Get or create a compiled query * Handles both old (new Query(lang, source)) and new (lang.query(source)) API */ export declare function getQuery(queryString: string, languageType: LanguageType): Promise; /** * Run an AST query against a parse tree */ export declare function runQuery(tree: Tree, queryString: string, languageType: LanguageType, ruleId: string): Promise; /** * Check content against an AST rule * Returns null if allowed, or match details if blocked */ export declare function checkASTRule(content: string, tree: Tree, languageType: LanguageType, rule: ASTRule): Promise; /** * Check content against multiple AST rules * Returns the first match found, or null if all pass */ export declare function checkASTRules(content: string, tree: Tree, languageType: LanguageType, rules: ASTRule[]): Promise; /** * Clear the query cache */ export declare function clearQueryCache(): void; /** * Get query cache statistics */ export declare function getQueryCacheStats(): { size: number; }; //# sourceMappingURL=query.d.ts.map