UNPKG

1.18 kBTypeScriptView Raw
1// Type definitions for power-assert-formatter 1.4.1
2// Project: https://github.com/twada/power-assert-formatter
3// Definitions by: vvakame <https://github.com/vvakame>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6declare function powerAssertFormatter(options?:powerAssertFormatter.Options):powerAssertFormatter.Formatter;
7
8declare namespace powerAssertFormatter {
9 export interface Options {
10 lineDiffThreshold?: number | undefined;
11 maxDepth?: number | undefined;
12 outputOffset?: number | undefined;
13 anonymous?: string | undefined;
14 circular?: string | undefined;
15 lineSeparator?: string | undefined;
16 ambiguousEastAsianCharWidth?: number | undefined;
17 widthOf?: Function | undefined;
18 stringify?: Function | undefined;
19 diff?: Function | undefined;
20 writerClass?: {new (): any;} | undefined;
21 renderers?: any[] | undefined; // { string | Function }[]
22 }
23
24 export interface Formatter {
25 (powerAssertContext:any): string;
26 }
27
28 export function defaultOptions():Options;
29}
30
31export = powerAssertFormatter;
32export as namespace powerAssertFormatter;