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

Function encodeSchemaString

packages/effect/src/encoding/JsonArray.ts:816–827  ·  view source on GitHub ↗
(
  schema: S
)

Source from the content-addressed store, hash-verified

814 * @since 4.0.6
815 */
816export const encodeSchemaString = <S extends Schema.Constraint>(
817 schema: S
818) =>
819<IE = never, Done = unknown>(): Channel.Channel<
820 Arr.NonEmptyReadonlyArray<string>,
821 JsonArrayError | Schema.SchemaError | IE,
822 Done,
823 Arr.NonEmptyReadonlyArray<S["Type"]>,
824 IE,
825 Done,
826 S["EncodingServices"]
827> => Channel.pipeTo(ChannelSchema.encode(schema)(), encodeString())
828
829/**
830 * Creates a channel that encodes values with a schema and writes them as UTF-8

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.80
encodeStringFunction · 0.70

Tested by

no test coverage detected