/** One piece of a line: the text, and what the terminal would have coloured it. */ export interface Token { text: string; /** Space-separated names — a colour, and any of bold, dim, italic. Empty for plain text. */ kind: string; } /** * Highlights with colour forced on, whatever the process is attached to. * * chalk decides for itself whether its output is a terminal, and a web server's output is not one * — so without forcing it every line comes back with no escapes at all and the panel is grey * again, which is the bug this exists to fix. The level is put back immediately; highlighting is * synchronous, so nothing else can observe the change. */ export declare function highlightTokens(lines: string[], filename: string): Token[][]; /** * ANSI escapes to tokens. * * chalk nests styles, so the open ones are a stack: the innermost colour names the token and * bold/dim/italic ride along beside it. Anything unrecognised is dropped rather than printed, * because a stray escape rendered as text is worse than a missing colour. */ export declare function parseAnsi(line: string): Token[]; /** Strips every escape, for anything that wants the plain text back. */ export declare function withoutAnsi(line: string): string; //# sourceMappingURL=highlight-web.d.ts.map