make checkout version and revert version fit pattern (#118)
This commit is contained in:
8
src/lib/assert.ts
Normal file
8
src/lib/assert.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export function assertExists<T>(
|
||||
value: T,
|
||||
message: string,
|
||||
): asserts value is NonNullable<T> {
|
||||
if (value === undefined || value === null) {
|
||||
throw new Error(message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user