Module

x/unknownutil/is.ts>isUndefined

🦕 A lightweight utility pack for handling unknown type
Go to Latest
function isUndefined
import { isUndefined } from "https://dotland.deno.dev/x/unknownutil@v3.18.0/is.ts";

Return true if the type of x is undefined.

import { is } from "@core/unknownutil";

const a: unknown = undefined;
if (is.Undefined(a)) {
  // a is narrowed to undefined
  const _: undefined = a;
}

Parameters

x: unknown

Returns

x is undefined