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

Function decodeSchemaString

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

Source from the content-addressed store, hash-verified

465 * @since 4.0.0
466 */
467export const decodeSchemaString = <S extends Schema.Constraint>(
468 schema: S
469) =>
470<IE = never, Done = unknown>(options?: {
471 readonly ignoreEmptyLines?: boolean | undefined
472}): Channel.Channel<
473 Arr.NonEmptyReadonlyArray<S["Type"]>,
474 Schema.SchemaError | NdjsonError | IE,
475 Done,
476 Arr.NonEmptyReadonlyArray<string>,
477 IE,
478 Done,
479 S["DecodingServices"]
480> => Channel.pipeTo(decodeString(options), ChannelSchema.decodeUnknown(schema)())
481
482/**
483 * Wraps a bidirectional byte channel with NDJSON encoding and decoding.

Callers

nothing calls this directly

Calls 1

decodeStringFunction · 0.70

Tested by

no test coverage detected