Skip to main content
Module

x/fuzzy_octo_guacamole/patterns.ts>Pattern

A playground for testing CI setup that deploys on Deno and NPM
Latest
type alias Pattern
Re-export
import { type Pattern } from "https://deno.land/x/fuzzy_octo_guacamole@v5.0.1/patterns.ts";

Pattern<a> is the generic type for patterns matching a value of type a. A pattern can be any (nested) javascript value.

They can also be wildcards, like P._, P.string, P.number, or other matchers, like P.when(predicate), P.not(pattern), etc.

Read the documentation for P.Pattern on GitHub

Examples

const pattern: P.Pattern = { name: P.string }

definition: unknown extends a ? UnknownPattern : KnownPattern<a>