MCPcopy Create free account
hub / github.com/Effect-TS/effect / decodeSchema

Function decodeSchema

packages/effect/src/unstable/encoding/Msgpack.ts:201–212  ·  view source on GitHub ↗
(
  schema: S
)

Source from the content-addressed store, hash-verified

199 * @since 4.0.0
200 */
201export const decodeSchema = <S extends Schema.Constraint>(
202 schema: S
203) =>
204<IE = never, Done = unknown>(): Channel.Channel<
205 Arr.NonEmptyReadonlyArray<S["Type"]>,
206 Schema.SchemaError | MsgPackError | IE,
207 Done,
208 Arr.NonEmptyReadonlyArray<Uint8Array<ArrayBuffer>>,
209 IE,
210 Done,
211 S["DecodingServices"]
212> => Channel.pipeTo(decode<IE, Done>(), ChannelSchema.decodeUnknown(schema)())
213
214/**
215 * Wraps a bidirectional byte channel with MessagePack encoding and decoding.

Callers

nothing calls this directly

Calls 1

decodeFunction · 0.70

Tested by

no test coverage detected