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

Function decodeSchema

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

Source from the content-addressed store, hash-verified

437 * @since 4.0.0
438 */
439export const decodeSchema = <S extends Schema.Constraint>(
440 schema: S
441) =>
442<IE = never, Done = unknown>(options?: {
443 readonly ignoreEmptyLines?: boolean | undefined
444 readonly maxLineBytes?: number | undefined
445}): Channel.Channel<
446 Arr.NonEmptyReadonlyArray<S["Type"]>,
447 Schema.SchemaError | NdjsonError | IE,
448 Done,
449 Arr.NonEmptyReadonlyArray<Uint8Array>,
450 IE,
451 Done,
452 S["DecodingServices"]
453> => Channel.pipeTo(decode(options), ChannelSchema.decodeUnknown(schema)())
454
455/**
456 * Creates an NDJSON string decoder channel for values of a schema.

Callers

nothing calls this directly

Calls 1

decodeFunction · 0.70

Tested by

no test coverage detected