import { isInstanceOf } from "https://deno.land/x/silicon@v1.0.0/deps.ts";
Return true
if the type of x
is instance of ctor
.
import is from "./is.ts";
const a: unknown = new Date();
if (is.InstanceOf(Date)(a)) {
// a is narrowed to Date
const _: Date = a;
}
Parameters
ctor: T