UNPKG

682 BTypeScriptView Raw
1export interface ColorFormat {
2 header(str: string): string;
3 bold(str: string): string;
4 error(str: string): string;
5 code(str: string): string;
6}
7export declare const richFormat: ColorFormat;
8export declare const textFormat: ColorFormat;
9/**
10 * Formats markdown text to be displayed to the console. Not all markdown features are supported.
11 *
12 * @param text The markdown text to format.
13 * @param opts.format The format to use.
14 * @param opts.paragraphs Whether to cut the text into paragraphs of 80 characters at most.
15 */
16export declare function formatMarkdownish(text: string, { format, paragraphs }: {
17 format: ColorFormat;
18 paragraphs: boolean;
19}): string;