🤖 Merge PR #45620 @types/assert: Update definitions to version 1.5 by @curtisman

* @types/assert: Add missing assert.strict type

* Add missing notDeepStrictEqual
This commit is contained in:
Curtis Man 2020-06-21 09:38:40 -07:00 committed by GitHub
parent bdba62e896
commit e129e83091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 1 deletions

View File

@ -13,3 +13,5 @@ assert.throws(
);
assert['fail'](true, true, 'works like a charm');
assert.strict; // $ExpectType typeof assert

View File

@ -1,4 +1,4 @@
// Type definitions for commonjs-assert 1.4
// Type definitions for commonjs-assert 1.5
// Project: https://github.com/browserify/commonjs-assert, https://github.com/defunctzombie/commonjs-assert
// Definitions by: Nico Gallinal <https://github.com/nicoabie>
// Linus Unnebäck <https://github.com/LinusU>
@ -22,6 +22,8 @@ declare namespace assert {
function deepStrictEqual(actual: any, expected: any, message?: string): void;
function notDeepStrictEqual(actual: any, expected: any, message?: string): void;
function strictEqual(actual: any, expected: any, message?: string): void;
function notStrictEqual(actual: any, expected: any, message?: string): void;
@ -54,6 +56,8 @@ declare namespace assert {
stackStartFunction?: () => void;
});
}
const strict: typeof assert;
}
export = assert;

View File

@ -57,3 +57,5 @@ assert['fail'](true, true, 'works like a charm');
assert.deepStrictEqual(a, { b: 2 });
a; // $ExpectType { b: number; }
}
assert.strict; // $ExpectType typeof assert

View File

@ -53,6 +53,8 @@ declare namespace assert {
stackStartFunction?: () => void;
});
}
const strict: typeof assert;
}
export = assert;