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

Function decodeSchema

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

Source from the content-addressed store, hash-verified

801 */
802export const decodeSchema =
803 <S extends Schema.Constraint>(schema: S) =>
804 <IE = never, Done = unknown>(options?: DecodeSchemaOptions, parseOptions?: SchemaAST.ParseOptions): Channel.Channel<
805 Arr.NonEmptyReadonlyArray<S["Type"]>,
806 IE | CsvError | Schema.SchemaError,
807 Done,
808 Arr.NonEmptyReadonlyArray<Uint8Array>,
809 IE,
810 Done,
811 S["DecodingServices"]
812 > =>
813 Channel.pipeTo(
814 Channel.decodeText<IE, Done>("utf-8", { ignoreBOM: true }),
815 decodeSchemaString(schema)<IE, Done>(options, parseOptions)
816 )
817
818const textEncoder = new TextEncoder()
819

Callers

nothing calls this directly

Calls 2

decodeTextMethod · 0.80
decodeSchemaStringFunction · 0.70

Tested by

no test coverage detected