Optionalmessage: string
The error message.
Optionaloptions: { cause?: unknown }ReadonlyisReadonlyisOptionalcauseReadonly~effect/Optional Readonly~effect/Suppress reports for this error.
Optional Readonly~effect/Override the severity level for this error.
Optional Readonly~effect/Attach extra key/value metadata to this error.
Optional Readonly~effect/Optional Readonly~effect/StaticRebuildStatic Readonly~effect/Static ReadonlyastStatic Readonly~type.parametersStatic Readonly~type.constructor.defaultStatic Readonly~type.mutabilityStatic Readonly~type.optionalityStatic Readonly~encoded.mutabilityStatic Readonly~encoded.optionalityReadonly_Static ReadonlyTypemake, makeOption, and makeEffect preserve an existing instance of
this class. Use new when a distinct instance is required.
Static ReadonlyEncodedStatic ReadonlyDecodingStatic ReadonlyEncodingStatic Readonly~type.make.inStatic Readonly~type.makeStatic ReadonlyIsoStatic ReadonlyidentifierStatic ReadonlyfieldsOptionalstackStaticretryableOptionaloptions: { isInternal?: boolean; cause?: unknown }StaticnonOptionaloptions: { isInternal?: boolean; cause?: unknown }StaticpipeStaticannotateStaticannotateStaticcheckStaticrebuildStaticmapReturns a new struct with the fields modified by the provided function.
Details
Options:
unsafePreserveChecks - if true, keep any .check(...) constraints
that were attached to the original struct. Defaults to false.
Warning: This is an unsafe operation. Since mapFields
transformations change the schema type, the original refinement functions
may no longer be valid or safe to apply to the transformed schema. Only
use this option if you have verified that your refinements remain correct
after the transformation.
Optionaloptions: { unsafePreserveChecks?: boolean }StaticextendReturns a function that creates a schema-backed subclass with this class's fields plus additional fields.
When to use
Use when you need a subclass whose constructor validates both inherited fields and newly added fields.
Details
The returned function accepts either a field map or a Struct. When you
pass a Struct, checks attached to that extension schema are preserved and
combined with checks from the base class schema.
Gotchas
Fields with the same name replace inherited fields. Use this to refine validation or change encoding. Effect does not check compatibility; the caller must ensure the replacement preserves the base class contract.
Checks from a Struct argument are evaluated against the full subclass
value after inherited and extension fields are merged. Object-wide checks
such as isMaxProperties count inherited fields too.
Error for task timeout scenarios, automatically retryable by default.
When thrown from within a task's run function, this marks the task execution as
timed_outrather thanfailed. Timeout errors are retryable by default since timeouts are often transient.Automatic vs Manual Timeouts
timeoutMsis exceededExample