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

Function toArrayCodec

packages/effect/src/encoding/Csv.ts:618–625  ·  view source on GitHub ↗
(codec: S)

Source from the content-addressed store, hash-verified

616}
617
618const toArrayCodec = <S extends Schema.Constraint>(codec: S): Schema.NonEmptyArray<S> => {
619 let array = arrayCodecs.get(codec)
620 if (array === undefined) {
621 array = Schema.NonEmptyArray(codec)
622 arrayCodecs.set(codec, array)
623 }
624 return array as Schema.NonEmptyArray<S>
625}
626
627// CSV cannot tell an empty cell from a missing one, so empty cells of optional
628// properties are decoded as missing keys. Each union member gets its own copy of

Callers 2

decodeSchemaStringFunction · 0.85
encodeSchemaRecordsFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected