Package: effect
Module: SchemaParser
Creates an effectful decoder for input already typed as the schema’s Encoded
type.
When to use
Use when you already have input typed as the schema’s Encoded type and
need an Effect whose failure channel is SchemaIssue.Issue, while
preserving decoding service requirements.
Details
The returned function succeeds with the decoded Type or fails with a
SchemaIssue.Issue, preserving any decoding service requirements in the
returned Effect.
See
decodeUnknownEffect for untyped boundary inputencodeEffect for the opposite directionSignature
declare const decodeEffect: <S extends Schema.Constraint>(schema: S, options?: SchemaAST.ParseOptions) => (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Effect.Effect<S["Type"], SchemaIssue.Issue, S["DecodingServices"]>
Since v4.0.0