2022-01-04 00:42:06 +01:00
|
|
|
export function VERIFY(condition: boolean, message?: string): asserts condition {
|
2021-10-24 22:55:30 +02:00
|
|
|
if (!condition) throw new Error(`VERIFY: ${message ?? 'Condition was not met.'}`);
|
|
|
|
}
|
|
|
|
|
|
|
|
export function VERIFY_NOT_REACHED(message?: string): void {
|
|
|
|
if (message !== undefined) throw new Error(`VERIFY_NOT_REACHED: ${message}`);
|
|
|
|
|
|
|
|
throw new Error('VERIFY_NOT_REACHED');
|
|
|
|
}
|
|
|
|
|
|
|
|
export function TODO(message?: string): void {
|
|
|
|
if (message !== undefined) throw new Error(`TODO: ${message}`);
|
|
|
|
|
|
|
|
throw new Error('TODO');
|
|
|
|
}
|