Skip to main content
Module

x/unknownutil/mod.ts>isUndefined

🦕 A lightweight utility pack for handling unknown type
Go to Latest
function isUndefined
import { isUndefined } from "https://deno.land/x/unknownutil@v3.18.0/mod.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