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

Function encodeSchemaString

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

Source from the content-addressed store, hash-verified

139 * @since 4.0.0
140 */
141export const encodeSchemaString = <S extends Schema.Constraint>(
142 schema: S
143) =>
144<IE = never, Done = unknown>(): Channel.Channel<
145 Arr.NonEmptyReadonlyArray<string>,
146 NdjsonError | Schema.SchemaError | IE,
147 Done,
148 Arr.NonEmptyReadonlyArray<S["Type"]>,
149 IE,
150 Done,
151 S["EncodingServices"]
152> => Channel.pipeTo(ChannelSchema.encode(schema)(), encodeString())
153
154/**
155 * Creates a channel that parses NDJSON string chunks into values.

Callers

nothing calls this directly

Calls 1

encodeStringFunction · 0.70

Tested by

no test coverage detected