Skip to main content
Module

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

Being able to pattern match in typescript
Latest
function arrayOf
import { arrayOf } from "https://deno.land/x/ts_matches@v5.4.0/src/parsers/array-of-parser.ts";

We would like to validate that all of the array is of the same type

Parameters

validator: Parser<unknown, A>

What is the validator for the values in the array

Returns

Parser<unknown, A[]>