From b5aaee998ca434c7ab48aa63f085916d342f825f Mon Sep 17 00:00:00 2001 From: networkException Date: Tue, 4 Jan 2022 00:42:06 +0100 Subject: [PATCH] Assertions: Allow typescript to infer condition correctly --- util/assertions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/assertions.ts b/util/assertions.ts index 0078eb5..60d0a53 100644 --- a/util/assertions.ts +++ b/util/assertions.ts @@ -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.'}`); }