1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import * as empower from "empower";
|
10 | import * as powerAssertFormatter from "power-assert-formatter";
|
11 |
|
12 | export = assert;
|
13 | export as namespace assert;
|
14 |
|
15 | declare function assert(value: unknown, message?: string): asserts value;
|
16 | declare namespace assert {
|
17 | class AssertionError implements Error {
|
18 | name: string;
|
19 | message: string;
|
20 | actual: unknown;
|
21 | expected: unknown;
|
22 | operator: string;
|
23 | generatedMessage: boolean;
|
24 |
|
25 | constructor(options?: {
|
26 |
|
27 | message?: string | undefined;
|
28 | actual?: unknown;
|
29 | expected?: unknown;
|
30 |
|
31 | operator?: string | undefined;
|
32 |
|
33 | stackStartFunction?: () => void | undefined
|
34 | });
|
35 | }
|
36 |
|
37 | function fail(actual?: unknown, expected?: unknown, message?: string, operator?: string): never;
|
38 | function ok(value: unknown, message?: string): asserts value;
|
39 | function equal(actual: unknown, expected: unknown, message?: string): void;
|
40 | function notEqual(actual: unknown, expected: unknown, message?: string): void;
|
41 | function deepEqual(actual: unknown, expected: unknown, message?: string): void;
|
42 | function notDeepEqual(actual: unknown, expected: unknown, message?: string): void;
|
43 | function strictEqual<T>(actual: unknown, expected: T, message?: string): asserts actual is T;
|
44 | function notStrictEqual(actual: unknown, expected: unknown, message?: string): void;
|
45 | function deepStrictEqual(actual: unknown, expected: unknown, message?: string): void;
|
46 | function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string): void;
|
47 | const throws: {
|
48 | (block: () => unknown, message?: string): void;
|
49 | (block: () => unknown, error: (new () => object) | RegExp | ((err: unknown) => boolean), message?: string): void;
|
50 | };
|
51 | const doesNotThrow: {
|
52 | (block: () => unknown, message?: string): void;
|
53 | (block: () => unknown, error: (new () => object) | RegExp | ((err: any) => boolean), message?: string): void;
|
54 | };
|
55 | function ifError(value: unknown): asserts value is null | undefined;
|
56 |
|
57 | const strict: typeof assert;
|
58 |
|
59 | interface Options {
|
60 | // tslint:disable-next-line:no-redundant-undefined
|
61 | assertion?: empower.Options | undefined;
|
62 | // tslint:disable-next-line:no-redundant-undefined
|
63 | output?: powerAssertFormatter.Options | undefined;
|
64 | }
|
65 |
|
66 | function customize(options: Options): typeof assert;
|
67 | }
|
68 |
|
\ | No newline at end of file |