Skip to content
@legacy

Documentation / @warp-drive/legacy / model-fragments / withArrayDefaults

Function: withArrayDefaults()

ts
function withArrayDefaults<ArrayName>(arrayName): object;

Defined in: warp-drive-packages/legacy/src/model-fragments/utilities/with-array-defaults.ts:10

Used as a helper to setup the relevant parts of an array schema and add extensions etc.

Type Parameters

ArrayName

ArrayName extends string

Parameters

arrayName

ArrayName

The name of the array

Returns

object

The schema for an array

kind

ts
kind: "array";

name

ts
name: ArrayName;

options

ts
options: object;

options.arrayExtensions

ts
arrayExtensions: string[];

type

ts
type: `array:${string}`;

Released under the MIT License.