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

Function encodeSchema

packages/effect/src/unstable/encoding/Ndjson.ts:117–128  ·  view source on GitHub ↗
(
  schema: S
)

Source from the content-addressed store, hash-verified

115 * @since 4.0.0
116 */
117export const encodeSchema = <S extends Schema.Constraint>(
118 schema: S
119) =>
120<IE = never, Done = unknown>(): Channel.Channel<
121 Arr.NonEmptyReadonlyArray<Uint8Array>,
122 NdjsonError | Schema.SchemaError | IE,
123 Done,
124 Arr.NonEmptyReadonlyArray<S["Type"]>,
125 IE,
126 Done,
127 S["EncodingServices"]
128> => Channel.pipeTo(ChannelSchema.encode(schema)(), encode())
129
130/**
131 * Creates an NDJSON string encoder channel for values of a schema.

Callers

nothing calls this directly

Calls 1

encodeFunction · 0.70

Tested by

no test coverage detected