diff --git a/src/utils/index.ts b/src/utils/index.ts index 23c8297b..c1d8094e 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -20,6 +20,7 @@ export function assert(condition: boolean, message: string): asserts condition { */ export function defined(obj: T): asserts obj is NonNullable { assert(obj !== undefined, 'undefined object'); + assert(obj !== null, 'null object'); } export type Maybe = [T?, Error?];