import type { Format } from './types.js'; import { type RichPreformat } from './rich.js'; export type MarkupTag = (chunks: string) => string; export type MarkupTags = Record; /** * Creates a markup formatter. * @param tags - Tag handlers used to map markup tags to strings. * @returns Formatter that returns a mapped string or `undefined`. */ export declare function markup(tags: MarkupTags): Format; /** * Creates a markup formatter with a fallback message. * @param fallback - Message used when the input is `undefined` or `null`. * @param tags - Tag handlers used to map markup tags to strings. * @returns Formatter that returns a mapped string. */ export declare function markup(fallback: string, tags: MarkupTags): Format; /** * Creates a markup formatter that fills values into the message through a preformat. * The preformat gets the whole message, so it can be `params`, `plural`, `match` or a composition of them. * Only the tags of the message are mapped: values filled in by the preformat are never parsed as tags. * @param tags - Tag handlers used to map markup tags to strings. * @param preformat - Formatter of the message, like `params`, `plural` or `match`. * @returns Formatter that returns a message function of the preformat parameters. */ export declare function markup(tags: MarkupTags, preformat: RichPreformat): Format string | undefined>; /** * Creates a markup formatter with a fallback message that fills values into the message through a preformat. * The preformat gets the whole message, so it can be `params`, `plural`, `match` or a composition of them. * Only the tags of the message are mapped: values filled in by the preformat are never parsed as tags. * @param fallback - Message used when the input is `undefined` or `null`. * @param tags - Tag handlers used to map markup tags to strings. * @param preformat - Formatter of the message, like `params`, `plural` or `match`. * @returns Formatter that returns a message function of the preformat parameters. */ export declare function markup(fallback: string, tags: MarkupTags, preformat: RichPreformat): Format string>; //# sourceMappingURL=markup.d.ts.map