From 36cbcf84d1eb96e8555b5414d348e37d9b1f68c7 Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Mon, 8 Jan 2024 22:49:54 +0000 Subject: [PATCH] feat: add a few negated assertions --- src/chai/interface/assert.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/chai/interface/assert.ts b/src/chai/interface/assert.ts index 334d2879..babf4e6a 100644 --- a/src/chai/interface/assert.ts +++ b/src/chai/interface/assert.ts @@ -50,11 +50,11 @@ export interface AssertInterface { isBelow(val: T, blw: T, msg?: string): void; isAtMost(val: T, atmst: T, msg?: string): void; isTrue(val: unknown, msg?: string): asserts val is true; - isNotTrue(val: unknown, msg?: string): void; + isNotTrue(val: T, msg?: string): asserts val is Exclude; isFalse(val: unknown, msg?: string): asserts val is false; - isNotFalse(val: unknown, msg?: string): void; + isNotFalse(val: T, msg?: string): asserts val is Exclude; isNull(val: unknown, msg?: string): asserts val is null; - isNotNull(val: unknown, msg?: string): void; + isNotNull(val: T, msg?: string): asserts val is Exclude; isNaN(val: unknown, msg?: string): asserts val is number; isNotNaN(val: unknown, msg?: string): void; exists(val: T, msg?: string): asserts val is NonNullable; @@ -68,12 +68,12 @@ export interface AssertInterface { isArray(val: unknown, msg?: string): asserts val is Array; isNotArray(val: unknown, msg?: string): void; isString(val: unknown, msg?: string): asserts val is string; - isNotString(val: unknown, msg?: string): void; + isNotString(val: T, msg?: string): asserts val is Exclude; isNumber(val: unknown, msg?: string): asserts val is number; - isNotNumber(val: unknown, msg?: string): void; + isNotNumber(val: T, msg?: string): asserts val is Exclude; isFinite(val: number, msg?: string): void; isBoolean(val: unknown, msg?: string): asserts val is boolean; - isNotBoolean(val: unknown, msg?: string): void; + isNotBoolean(val: T, msg?: string): asserts val is Exclude; // typeof typeOf(val: unknown, type: 'undefined'): asserts val is undefined;