UNPKG

892 BTypeScriptView Raw
1import chalk from 'chalk';
2export interface FormattableProblem {
3 level: 0 | 1 | 2;
4 name: string;
5 message: string;
6}
7export interface FormattableResult {
8 errors?: FormattableProblem[];
9 warnings?: FormattableProblem[];
10}
11export interface WithInput {
12 input?: string;
13}
14export interface FormattableReport {
15 results?: (FormattableResult & WithInput)[];
16}
17export declare type ChalkColor = keyof typeof chalk;
18export interface FormatOptions {
19 color?: boolean;
20 signs?: readonly [string, string, string];
21 colors?: readonly [ChalkColor, ChalkColor, ChalkColor];
22 verbose?: boolean;
23 helpUrl?: string;
24}
25export declare function format(report?: FormattableReport, options?: FormatOptions): string;
26export declare function formatResult(result?: FormattableResult, options?: FormatOptions): string[];
27export default format;
28//# sourceMappingURL=format.d.ts.map
\No newline at end of file