/** * Server-side syntax highlighting (MAIN-SCOPE §3 Highlight package). Produces a stable, serializable * token stream consumed by file previews (features/file-explorer-transfer.md) and git diff rendering * (features/git-checkout.md). Pure-JS / dependency-free regex tokenizer with graceful plain-text * fallback. Concatenating `tokens[].value` in order exactly reproduces the source (lossless). * * TODO(verify): the original package's exact highlighter library / grammar set. */ export type TokenType = "keyword" | "string" | "comment" | "number" | "punctuation" | "identifier" | "text"; export interface HighlightToken { type: TokenType; value: string; } export interface HighlightResult { language: Language; tokens: HighlightToken[]; } export type Language = "typescript" | "javascript" | "json" | "plaintext"; /** Detect a language from a file path / extension hint. Unknown → plaintext. */ export declare function detectLanguage(pathOrHint: string | undefined): Language; /** Highlight `source` for the given language/path hint. */ export declare function highlight(source: string, hint?: string): HighlightResult; //# sourceMappingURL=highlight.d.ts.map