export = TextFormatter; declare class TextFormatter { /** * Regex to match all the formatting codes * @type {RegExp} */ static formatCodesRegex: RegExp; /** * Regex to match all the color formatting codes * @type {RegExp} */ static colorCodesRegex: RegExp; /** * Deformat the text * @param {string} input * @param {deformatOptions} [options] * @returns {string} */ static deformat(input: string, options?: deformatOptions | undefined): string; /** * Format the text to ANSI escape codes * @param {string} input * @param {formatAnsiOptions} [options] * @returns {string} */ static formatAnsi: (input: string, options?: formatAnsiOptions | undefined) => string; /** * Format the text to HTML format * @param {string} input * @param {formatHtmlOptions} [options] * @returns {string} */ static formatHtml: (input: string, options?: formatHtmlOptions | undefined) => string; } declare namespace TextFormatter { export { deformatOptions, formatAnsiOptions, formatHtmlOptions }; } type deformatOptions = { /** * Deformat only the color codes */ colorOnly: boolean | null; }; type formatAnsiOptions = { /** * Disable links */ disableLinks: boolean | null; /** * Disable colors */ disableColor: boolean | null; /** * Optimize colors for light backgrounds */ lightBackground: boolean | null; /** * The color depth. If omitted, 24bit is used */ colorDepth: ("4bit" | "8bit" | "24bit") | null; }; type formatHtmlOptions = { /** * Disable links */ disableLinks: boolean | null; /** * Optimize colors for light backgrounds */ lightBackground: boolean | null; /** * The “target” attribute for links. Generally, you should use “_blank” to open links in a new tab. */ linkTarget: string | null; };