Move to protobufjs in ts/groups.ts
This commit is contained in:
parent
972a4cba0c
commit
9f0c630574
30 changed files with 1424 additions and 964 deletions
|
@ -19,3 +19,15 @@ export function assert(condition: unknown, message: string): asserts condition {
|
|||
log.error('assert failure:', err && err.stack ? err.stack : err);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws an error if the condition is falsy, regardless of environment.
|
||||
*/
|
||||
export function strictAssert(
|
||||
condition: unknown,
|
||||
message: string
|
||||
): asserts condition {
|
||||
if (!condition) {
|
||||
throw new Error(message);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue