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

Function encodeSchemaString

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

Source from the content-addressed store, hash-verified

181 * @since 4.0.0
182 */
183export const encodeSchemaString = <S extends Schema.Constraint>(
184 schema: S
185) =>
186<IE = never, Done = unknown>(): Channel.Channel<
187 Arr.NonEmptyReadonlyArray<string>,
188 NdjsonError | Schema.SchemaError | IE,
189 Done,
190 Arr.NonEmptyReadonlyArray<S["Type"]>,
191 IE,
192 Done,
193 S["EncodingServices"]
194> => Channel.pipeTo(ChannelSchema.encode(schema)(), encodeString())
195
196// Collects the values of one input chunk into `out`. A failure stops the
197// chunk, and the values collected before it are still emitted.

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.80
encodeStringFunction · 0.70

Tested by

no test coverage detected