/** * AST-agnostic recognition heuristics + small source helpers shared by both * walkers. The crux of B1 (which calls are translation calls) lives here so the * TypeScript and Svelte walkers stay thin. */ import type { ExtractedKey, KeyUsageSite, UsageScan } from './types.js'; export declare function isFactoryName(name: string): boolean; export declare function isRenderMethod(name: string): boolean; export declare function isProbeMethod(name: string): boolean; export declare function isKeyMethod(name: string): boolean; /** File-local identifiers bound to a translate function, split render vs probe. */ export interface Bindings { render: Set; probe: Set; } export declare function createBindings(extra?: string[]): Bindings; export declare function createScan(): UsageScan; /** Route one call's extracted keys into the scan; an empty extraction is an opaque site. */ export declare function recordKeyCall(scan: UsageScan, extractions: ExtractedKey[], site: KeyUsageSite, isProbe: boolean): void; /** Combine per-file scans into one. */ export declare function mergeScans(scans: UsageScan[]): UsageScan; /** A fast 1-based line lookup from a character offset, precomputed once per file. */ export declare function makeLineAt(code: string): (offset: number) => number; /** The trimmed text of a 1-based line, for report context. */ export declare function makeContextAt(code: string): (line: number) => string;