Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/unknownutil/mod.ts>ensureNull

🦕 An utility pack for handling unknown type in deno
Go to Latest
function ensureNull
import { ensureNull } from "https://deno.land/x/unknownutil@v2.1.1/mod.ts";

Return x as-is if x is null or raise an EnsureError when it's not.

Parameters

x: unknown