import { isNullish } from "https://deno.land/x/unknownutil@v3.18.1/is.ts";
Return true
if the type of x
is null
or undefined
.
import { is } from "@core/unknownutil";
const a: unknown = null;
if (is.Nullish(a)) {
// a is narrowed to null | undefined
const _: (null | undefined) = a;
}