Skip to content

remix/data-schema · Function

View Source

array

Summary

Create a schema that validates an array by validating each element with elementSchema.

Signature

function array<input, output>(elementSchema: Schema<input, output>): Schema<unknown, output[]>

Parameters

elementSchema

The schema to validate each element

Returns

A schema that produces an array of validated outputs