Skip to main content
Module

x/unknownutil/assert.ts

🦕 An utility pack for handling unknown type in deno
Go to Latest
import * as unknownutil from "https://deno.land/x/unknownutil@v2.1.0/assert.ts";

Classes

An error raised by type assertion functions

Functions

Ensure that x is array, and raise AssertError if it is not.

Ensure that x is boolean, and raise AssertError if it is not.

Ensure that x is function, and raise AssertError if it is not.

Ensure that x follows the type of ref, and raise AssertError if it is not.

Ensure that x is null, and raise AssertError if it is not.

Ensure that x is null or undefined, and raise AssertError if it is not.

Ensure that x is number, and raise AssertError if it is not.

Ensure that x is object, and raise AssertError if it is not.

Ensure that x is string, and raise AssertError if it is not.

Ensure that x is undefined, and raise AssertError if it is not.