/** * What the part after `#` names, decided by the target file: a dotted key path in JSON, * a heading in Markdown, a line range (`L3`, `L3-L9`) or a symbol in any other file. */ type SelectorKind = "json-key" | "heading" | "line" | "symbol"; type SelectorResolution = { ok: true; } | { ok: false; reason: string; }; interface SelectedRegion { text: string; /** False when the region is the whole file because the selector could not be narrowed. */ narrowed: boolean; } export declare function selectorKind(target: string, selector: string): SelectorKind; /** JSON with object keys sorted, so key order and formatting never change a digest. */ export declare function canonicalJson(value: unknown): string; /** Walk a dotted key path through objects and, by numeric segment, arrays. */ export declare function selectedValue(root: unknown, selector: string): unknown; /** Does the selector name something in this target's content? */ export declare function resolveSelector(target: string, content: string, selector: string): SelectorResolution; /** * The text a review depends on, or null when the selector names nothing. A region is never * narrower than can be shown: a symbol outside JS/TS, or one TypeScript cannot find as a * declaration, is the whole file, so a change can only ask for more re-reads, never fewer. */ export declare function selectedRegion(target: string, content: string, selector: string): SelectedRegion | null; export {};