Skip to main content
Module

x/ts_matches/src/parsers/array-of-parser.ts>ArrayOfParser

Being able to pattern match in typescript
Go to Latest
class ArrayOfParser
implements IParser<unknown, B[]>
import { ArrayOfParser } from "https://deno.land/x/ts_matches@v5.2.0/src/parsers/array-of-parser.ts";

Given an object, we want to make sure the key exists and that the value on the key matches the parser Note: This will mutate the value sent through

Constructors

new
ArrayOfParser(parser: Parser<unknown, B>, description?)

Methods

parse<C, D>(a: unknown, onParse: OnParse<unknown, B[], C, D>): C | D