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

Function encodeSchema

packages/effect/src/encoding/Csv.ts:1102–1115  ·  view source on GitHub ↗
(schema: S)

Source from the content-addressed store, hash-verified

1100 */
1101export const encodeSchema =
1102 <S extends Schema.Constraint>(schema: S) =>
1103 <IE = never, Done = unknown>(options?: EncodeSchemaOptions<S>): Channel.Channel<
1104 Arr.NonEmptyReadonlyArray<Uint8Array>,
1105 IE | Schema.SchemaError,
1106 Done,
1107 Arr.NonEmptyReadonlyArray<S["Type"]>,
1108 IE,
1109 Done,
1110 S["EncodingServices"]
1111 > =>
1112 Channel.map(
1113 encodeSchemaRecords<S, IE, Done>(schema, options),
1114 (texts) => Arr.of(textEncoder.encode(texts.join("")))
1115 )

Callers

nothing calls this directly

Calls 5

encodeSchemaRecordsFunction · 0.85
encodeMethod · 0.80
ofMethod · 0.65
mapMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected