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