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

Function encodeSchema

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

Source from the content-addressed store, hash-verified

836 * @since 4.0.6
837 */
838export const encodeSchema = <S extends Schema.Constraint>(
839 schema: S
840) =>
841<IE = never, Done = unknown>(): Channel.Channel<
842 Arr.NonEmptyReadonlyArray<Uint8Array>,
843 JsonArrayError | Schema.SchemaError | IE,
844 Done,
845 Arr.NonEmptyReadonlyArray<S["Type"]>,
846 IE,
847 Done,
848 S["EncodingServices"]
849> => Channel.pipeTo(ChannelSchema.encode(schema)(), encode())

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.80
encodeFunction · 0.70

Tested by

no test coverage detected