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

x/fsrouter/deps.ts>asserts.assertInstanceOf

A file system based router for Deno.
Go to Latest
function asserts.assertInstanceOf
import { asserts } from "https://deno.land/x/fsrouter@2.11.1/deps.ts";
const { assertInstanceOf } = asserts;

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

Type Parameters

T extends AnyConstructor

Parameters

actual: unknown
expectedType: T
optional
msg = [UNSUPPORTED]

Returns

asserts actual is GetConstructorType<T>