Improve the TypeScript types

Use more type guards.
This commit is contained in:
Sindre Sorhus 2019-02-02 03:02:47 +07:00
parent cbd9f061c5
commit f0c73b0f21
3 changed files with 56 additions and 42 deletions

View file

@ -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(() => {