make checkout version and revert version fit pattern (#118)

This commit is contained in:
Will Chen
2025-05-08 23:23:24 -07:00
committed by GitHub
parent 8d61659c60
commit c203b1d009
9 changed files with 161 additions and 92 deletions

8
src/lib/assert.ts Normal file
View 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);
}
}