export function assert(thing: T, errorMessage?: string): asserts thing is NonNullable { if (thing === null || thing === undefined) { throw new Error(errorMessage) } }