import type { LanguageFn } from 'highlight.js'; /** A language of the dialog: its highlight.js name and its display name */ export interface CodeLanguage { name: string; label: string; } /** Name used for the automatic detection of the language */ export declare const AUTO = "auto"; /** Language of code that is not highlighted */ export declare const PLAIN = "plaintext"; /** * Registers a highlight.js language, in addition to the common ones that are included */ export declare function registerLanguage(name: string, language: LanguageFn): void; /** * Languages known to the highlighter, sorted by display name. With `only`, just those of them, in that order. */ export declare function listLanguages(only?: string[]): CodeLanguage[]; /** Display name of a language, or the name itself when it is unknown */ export declare function languageLabel(name: string): string; /** * Highlights `code` and returns the highlight.js HTML: escaped text with `` tokens. * `'auto'` detects the language; an unknown language is treated as plain text. */ export declare function highlight(code: string, language: string): { language: string; html: string; };