assertNot()function
assertNot(left: T | N, right: N, caller: AnyCaller = assertNot): asserts left is T
| Return | |
|---|---|
asserts left is T |
| Throws | |
|---|---|
RequiredError | If the values are equal. |
Assert that two values are not equal, narrowing left to exclude the type of right.
Examples
assertNot(1, 2); // passes