Package: effect
Module: ChannelSchema
Creates a decode channel variant for schema-decoding channel boundaries.
When to use
Use when you need an intentionally unknown or untyped encoded input while keeping only the decoded output statically typed according to the schema.
Details
The channel decodes non-empty encoded chunks into schema values, emits
SchemaError when decoding fails, and requires the schema’s decoding
services.
See
decode for the typed variant that preserves the schema’s encoded typeSignature
declare const decodeUnknown: <S extends Schema.Constraint>(schema: S) => <IE = never, Done = unknown>() => Channel.Channel<Arr.NonEmptyReadonlyArray<S["Type"]>, IE | Schema.SchemaError, Done, Arr.NonEmptyReadonlyArray<S["Encoded"]>, IE, Done, S["DecodingServices"]>
Since v4.0.0