MCPcopy Create free account
hub / github.com/effect-app/libs / withDecodingDefaultTypeKey

Function withDecodingDefaultTypeKey

repos/effect/packages/effect/src/Schema.ts:5758–5768  ·  view source on GitHub ↗
(
  defaultValue: Effect.Effect<S["Type"], SchemaError, R>,
  options?: DecodingDefaultOptions
)

Source from the content-addressed store, hash-verified

5756 readonly "Encoded": S["Encoded"]
5757 readonly "DecodingServices": S["DecodingServices"]
5758 readonly "EncodingServices": S["EncodingServices"]
5759 readonly "~type.make.in": S["~type.make.in"]
5760 readonly "~type.make": S["~type.make"]
5761 readonly "Iso": S["Iso"]
5762 readonly schema: S
5763}
5764
5765/**
5766 * Attaches a constructor default value to a schema field.
5767 *
5768 * **Details**
5769 *
5770 * Constructor defaults are applied only during `make*`, not during decoding or
5771 * encoding. Failures are represented directly as `SchemaIssue.Issue` values.

Callers

nothing calls this directly

Calls 5

toTypeInterface · 0.85
encodeToFunction · 0.85
withDecodingDefaultKeyFunction · 0.70
optionalKeyInterface · 0.70
pipeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…