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

Function encodeSchema

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

Source from the content-addressed store, hash-verified

101 * @since 4.0.0
102 */
103export const encodeSchema = <S extends Schema.Constraint>(
104 schema: S
105) =>
106<IE = never, Done = unknown>(): Channel.Channel<
107 Arr.NonEmptyReadonlyArray<Uint8Array<ArrayBuffer>>,
108 MsgPackError | Schema.SchemaError | IE,
109 Done,
110 Arr.NonEmptyReadonlyArray<S["Type"]>,
111 IE,
112 Done,
113 S["EncodingServices"]
114> => Channel.pipeTo(ChannelSchema.encode(schema)(), encode())
115
116/**
117 * Creates a channel that decodes MessagePack byte chunks into values.

Callers

nothing calls this directly

Calls 1

encodeFunction · 0.70

Tested by

no test coverage detected