import rethrow from './rethrow.js' import type { Assert, Nullish } from './prelude.js' const nullishOr = (a: Assert): Assert> => value => value == null ? value as undefined | null : rethrow(a, 'Was not nullish.')(value) export default nullishOr