Assertions: Allow typescript to infer condition correctly
This commit is contained in:
parent
979d8a5e74
commit
b5aaee998c
1 changed files with 1 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
export function VERIFY(condition: boolean, message?: string): asserts condition is true {
|
||||
export function VERIFY(condition: boolean, message?: string): asserts condition {
|
||||
if (!condition) throw new Error(`VERIFY: ${message ?? 'Condition was not met.'}`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue