Move to protobufjs in ts/groups.ts

This commit is contained in:
Fedor Indutny 2021-06-22 07:46:42 -07:00 committed by GitHub
parent 972a4cba0c
commit 9f0c630574
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 1424 additions and 964 deletions

View file

@ -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);
}
}