Readonly~effect/Readonly~encoded.mutabilityReadonly~encoded.optionalityReadonly~type.constructor.defaultReadonly~type.makeReadonly~type.make.inReadonly~type.mutabilityReadonly~type.optionalityReadonly~type.parametersReadonlyastReadonlyDecodingReadonlyEncodedReadonlyEncodingReadonlyRebuildReadonlyTypeConstructs a value from the make input representation synchronously.
When to use
Use when constructor input is trusted or when validation failure
should abort with a thrown Error.
Details
Applies constructor defaults and type-side validation according to
MakeOptions.
Gotchas
Throws an Error with the schema issue in its cause when validation
fails. Schema validation failures use the generic message
"Schema validation failed"; format the cause explicitly with
SchemaIssue.makeFormatterDefault() when human-readable details are needed.
Causes that contain defects, interruptions, or other non-schema reasons
throw with the underlying Cause attached instead.
Optionaloptions: MakeOptionsConstructs a value from the make input representation, returning validation
failures in the Effect error channel.
When to use
Use when construction must compose with other Effect operations or when
the result supplies a nested constructor default. Otherwise, use
BottomWithoutNew.make when invalid construction should throw.
Details
SchemaParser uses SchemaIssue.Issue as its canonical structured failure,
and this method exposes the same representation directly. Keeping the issue
unwrapped lets an enclosing schema attach its own path when the effect is
used with withConstructorDefault. It also avoids allocating a
SchemaError and keeps its formatting path out of the resulting bundle.
Gotchas
Unlike the decoding helpers in Schema, validation failures are not wrapped
in SchemaError. Map the issue to SchemaError or to a domain-specific error
when a wrapped error is needed at the application boundary.
Optionaloptions: MakeOptionsConstructs a value from the make input representation, returning Option.none
when validation fails.
When to use
Use when you only need to know whether construction succeeds and do not need validation details.
Details
Applies constructor defaults and type-side validation according to
MakeOptions.
Gotchas
Only causes made entirely of schema issues are converted to None. Causes
that contain defects, interruptions, or other non-schema reasons throw
instead.
Optionaloptions: MakeOptions
TypeScript type for a Ref schema. This is the type of the SCHEMA itself, not the runtime ref instance. For the instance type, use
Ref.Ref<T>from the Ref module.Example