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

Function decodeSchemaString

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

Source from the content-addressed store, hash-verified

257 * @since 4.0.0
258 */
259export const decodeSchemaString = <S extends Schema.Constraint>(
260 schema: S
261) =>
262<IE = never, Done = unknown>(options?: {
263 readonly ignoreEmptyLines?: boolean | undefined
264}): Channel.Channel<
265 Arr.NonEmptyReadonlyArray<S["Type"]>,
266 Schema.SchemaError | NdjsonError | IE,
267 Done,
268 Arr.NonEmptyReadonlyArray<string>,
269 IE,
270 Done,
271 S["DecodingServices"]
272> => Channel.pipeTo(decodeString(options), ChannelSchema.decodeUnknown(schema)())
273
274/**
275 * Wraps a bidirectional byte channel with NDJSON encoding and decoding.

Callers

nothing calls this directly

Calls 1

decodeStringFunction · 0.85

Tested by

no test coverage detected