export interface Token { text: string; color?: string | undefined; dim?: boolean | undefined; bold?: boolean | undefined; } export type Lang = 'ts' | 'js' | 'json' | 'bash' | 'python' | 'diff' | 'plain'; /** Carry state for constructs that span lines (block comments, triple strings). */ export interface HLState { block?: boolean | undefined; triple?: string | null; } /** * Highlight ONE line. `carry` threads multi-line state (block comments, triple * strings) from the previous line; pass the returned `carry` into the next call. * Guarantees `result.tokens.map(t=>t.text).join('') === line`. */ export declare function highlightLine(line: string, lang: Lang, carry?: HLState): { tokens: Token[]; carry: HLState; }; /** Map a code-fence info string (```ts, ```bash, …) to a supported Lang. */ export declare function detectLang(fenceInfo: string): Lang; /** * Infer a supported Lang from a file path's extension (`foo/bar.tsx` → `ts`). * Used by diff rendering to syntax-highlight changed/context lines of the * touched file. Unknown or missing extensions fall back to `plain`. */ export declare function langFromPath(path: string): Lang; //# sourceMappingURL=highlight.d.ts.map