export interface AstMatch { lineNumber: number; lineText: string; /** * Suppression anchor: the matched construct's start line text and the line * immediately above it. The inline-directive convention (mmnto-ai/totem#1889) * attaches `// totem-ignore` / `// totem-context:` to the construct's start * line or the line above it, but `lineNumber` is the first *added* line * within the node's range — under diff scope it can drift into the construct * body, off the start line, so a directive on the start line is otherwise * missed (mmnto-ai/totem#2214). Consumers check this anchor in addition to * the reported line. */ startLineText: string; startPrecedingLineText: string | null; } /** * Convenience wrapper: read + parse + query in one call. * For batch operations, use `matchAstQueriesBatch` instead. */ export declare function matchAstQuery(filePath: string, astQuery: string, addedLineNumbers: number[], cwd: string): Promise; /** * Parse a file once and run multiple AST queries against it efficiently. * O(M + N) instead of O(M * N) — file is read and parsed exactly once. * Returns results indexed by position in the input array. */ export declare function matchAstQueriesBatch(filePath: string, queries: Array<{ astQuery: string; addedLineNumbers: number[]; }>, workingDirectory: string, onWarn?: (msg: string) => void, // totem-context: fallback ensures query failures are never silently swallowed readStrategy?: (filePath: string) => Promise): Promise; //# sourceMappingURL=ast-query.d.ts.map