import { FancyString, NormalizeVerbaStringOptions, StringFormat, VerbaColorizer, VerbaString } from './types'; import kleur from 'kleur'; export declare const verbaColorizer: VerbaColorizer; export declare const verbaDecolorizer: VerbaColorizer; export declare const getColorizer: (options?: NormalizeVerbaStringOptions) => kleur.Kleur; /** * Normalizes the given `VerbaString` `str` to a `string`. */ export declare const normalizeVerbaString: (str: VerbaString, options?: NormalizeVerbaStringOptions) => string; /** * Creates a function that normalizes a `VerbaString`. * * This is a performance-optimized `normalizeVerbaString` that bakes-in the colorizer. */ export declare const createVerbaStringNormalizer: (options?: NormalizeVerbaStringOptions) => (str: VerbaString) => string; /** * Renders the given `FancyString` `s` to a `string` */ export declare const renderFancyString: (s: FancyString, options?: NormalizeVerbaStringOptions) => string; /** * Renders the given string `s` with the given `formats`. * * @example * const formattedString = renderStringWithFormats('foo', ['white', 'bold', 'underline']) */ export declare const renderStringWithFormats: (s: string, formats: StringFormat[], options?: NormalizeVerbaStringOptions) => string; /** * Performant version of `renderStringWithFormats` that does some precalculation * to improve performance when called with many strings. */ export declare const createStringFormatter: (formats: StringFormat[], options?: NormalizeVerbaStringOptions) => ((s: string) => string); /** * Determines if the given `value` represents a `VerbaString`, i.e. a `string`, * `function`, or `(string | function)[]`. * * Note that the above types are not very unique, therefore be cautious about * what other types that `value` could be. */ export declare const isVerbaString: (value: unknown) => value is VerbaString;