Improve the TypeScript types
Use more type guards.
This commit is contained in:
parent
cbd9f061c5
commit
f0c73b0f21
3 changed files with 56 additions and 42 deletions
|
|
@ -867,7 +867,7 @@ test('is.any', t => {
|
|||
t.false(is.any(is.integer, true, 'lol', {}));
|
||||
|
||||
t.throws(() => {
|
||||
is.any(null, true);
|
||||
is.any(null as any, true);
|
||||
});
|
||||
|
||||
t.throws(() => {
|
||||
|
|
@ -882,7 +882,7 @@ test('is.all', t => {
|
|||
t.false(is.all(is.set, new Map(), {}));
|
||||
|
||||
t.throws(() => {
|
||||
is.all(null, true);
|
||||
is.all(null as any, true);
|
||||
});
|
||||
|
||||
t.throws(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue