ArraySchema
Extends
Section titled “Extends”Methods<Native.$Array<E>,ArraySchema<E>>
Type Parameters
Section titled “Type Parameters”E extends Native.Top
Properties
Section titled “Properties”
readonlyis: (input) =>input is readonly E["Type"][]
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”input is readonly E["Type"][]
Inherited from
Section titled “Inherited from”Methods.is
readonlyparse: (input) =>Effect<readonlyE["Type"][],ParseError,E["DecodingServices"]>
Checks input and returns it typed, with defaults filled in and unknown object keys removed.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”Effect<readonly E["Type"][], ParseError, E["DecodingServices"]>
Example
Section titled “Example”const config = yield* Config.parse(JSON.parse(text));Inherited from
Section titled “Inherited from”Methods.parse
schema
Section titled “schema”
readonlyschema:$Array
The Effect schema underneath, for use with effect/Schema.
Inherited from
Section titled “Inherited from”Methods.schema
Methods
Section titled “Methods”default()
Section titled “default()”default(
value):Field<withDecodingDefaultType<$Array<E>,never>>
Uses value when the input is undefined or an object leaves the key out.
Parameters
Section titled “Parameters”readonly E["Type"][]
Returns
Section titled “Returns”Field<withDecodingDefaultType<$Array<E>, never>>
Inherited from
Section titled “Inherited from”Methods.default
max(
length,message?):ArraySchema<E>
Parameters
Section titled “Parameters”length
Section titled “length”number
message?
Section titled “message?”string
Returns
Section titled “Returns”ArraySchema<E>
min(
length,message?):ArraySchema<E>
Parameters
Section titled “Parameters”length
Section titled “length”number
message?
Section titled “message?”string
Returns
Section titled “Returns”ArraySchema<E>
nullable()
Section titled “nullable()”nullable():
Schema<NullOr<$Array<E>>>
Returns
Section titled “Returns”Schema<NullOr<$Array<E>>>
Inherited from
Section titled “Inherited from”Methods.nullable
optional()
Section titled “optional()”optional():
Field<optional<$Array<E>>>
Allows undefined, and lets an object leave the key out.
Returns
Section titled “Returns”Field<optional<$Array<E>>>
Inherited from
Section titled “Inherited from”Methods.optional
refine()
Section titled “refine()”refine(
predicate,message?):ArraySchema
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(value) => boolean
message?
Section titled “message?”string
Returns
Section titled “Returns”ArraySchema
Inherited from
Section titled “Inherited from”Methods.refine