Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hex/src/service/deps.ts>asserts.assertNotInstanceOf

An ecosystem delivering practices, philosophy and portability.
Go to Latest
function asserts.assertNotInstanceOf
import { asserts } from "https://deno.land/x/hex@0.5.15/src/service/deps.ts";
const { assertNotInstanceOf } = asserts;

Make an assertion that obj is not an instance of type. If so, then throw.

Parameters

actual: A
unexpectedType: new (...args: any[]) => T
optional
msg = [UNSUPPORTED]

Returns

asserts actual is Exclude<A, T>