@legacy
Documentation / @warp-drive/legacy / model-fragments / withArrayDefaults
Documentation / @warp-drive/legacy / model-fragments / withArrayDefaults
Function: withArrayDefaults()
ts
function withArrayDefaults<ArrayName, PrimitiveType>(arrayName, primitiveType?): PrimitiveType extends undefined ? object : object;Defined in: warp-drive-packages/legacy/src/model-fragments/utilities/with-array-defaults.ts:9
Used as a helper to setup the relevant parts of an array schema and add extensions etc.
Type Parameters
ArrayName
ArrayName extends string
PrimitiveType
PrimitiveType extends string
Parameters
arrayName
ArrayName
The name of the array
primitiveType?
PrimitiveType
The primitive type of items in the array (optional)
Returns
PrimitiveType extends undefined ? object : object
The schema for an array