Reviewed-on: https://home.schmelczer.dev/git/git/andras/vault-link/pulls/190 Co-authored-by: Andras Schmelczer <andras@schmelczer.dev> Co-committed-by: Andras Schmelczer <andras@schmelczer.dev>
5 lines
133 B
TypeScript
5 lines
133 B
TypeScript
export function assert(value: boolean, message: string): asserts value {
|
|
if (!value) {
|
|
throw new Error(message);
|
|
}
|
|
}
|