UNPKG

1.03 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;
11 maxDepth?: number;
12 outputOffset?: number;
13 anonymous?: string;
14 circular?: string;
15 lineSeparator?: string;
16 ambiguousEastAsianCharWidth?: number;
17 widthOf?: Function;
18 stringify?: Function;
19 diff?: Function;
20 writerClass?: {new (): any;};
21 renderers?: any[]; // { 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;