Skip to main content
Module

x/fuzzy_octo_guacamole/patterns.ts>instanceOf

A playground for testing CI setup that deploys on Deno and NPM
Go to Latest
function instanceOf
import { instanceOf } from "https://deno.land/x/fuzzy_octo_guacamole@v2.0.0/patterns.ts";

P.instanceOf(SomeClass) is a pattern matching instances of a given class.

Read P.instanceOf documentation on GitHub

Examples

.with(P.instanceOf(SomeClass), () => 'will match on SomeClass instances')

Type Parameters

T extends AnyConstructor

Parameters

classConstructor: T

Returns

GuardP<unknown, InstanceType<T>>