Skip to main content
Module

x/typeguardkit/mod.ts>array

A TypeScript module to help construct type assertion functions and type guards.
Latest
function array
import { array } from "https://deno.land/x/typeguardkit@0.32.1/mod.ts";

array can be used to create an ArrayAsserter without specifying a typeName or ArrayAsserterOptions.

Example:

import { _string, array, Asserted } from "typeguardkit";

export const _ArrayOfString = array(_string);

export type ArrayOfString = Asserted<typeof _ArrayOfString>;

Type Parameters

ElementAsserter extends Asserter<unknown>

Parameters

elementAsserter: ElementAsserter