Skip to content

array

array<T>(inner, opts?): TypeWrapper<T[]>

Defined in: .work/repos/edinburgh/src/types.ts:770

Create an array type wrapper with optional length constraints.

T

The element type.

TypeWrapper<T>

Type wrapper for array elements.

Optional constraints (min/max length).

number

number

TypeWrapper<T[]>

An array type instance.

const stringArray = E.array(E.string);
const boundedArray = E.array(E.number, {min: 1, max: 10});