Decoder.tagged.option/either/try/list/map/obj(inner?) — round-trip the {_tag, value} shape
used by functype's built-in .toJSON() (for functype-to-functype services)
Adapts a parser that throws on bad input (Zod's schema.parse, a hand-written check) into a
Decoder. A throw becomes a DecoderError leaf whose cause is the thrown value.
Decoder namespace: combinators for converting
unknowninto typed values.Decoder.string/.number/.boolean/.unknown/.nullable(inner)— leaf primitivesDecoder.fromThrowing(parse)— adapt a throwing parser (Zod.parse); a throw becomes a leaf errorDecoder.option(inner)— null-bias Option (null → None, else inner → Some)Decoder.either.envelope({ok, err})/.discriminated({...}, l, r)— Either variantsDecoder.list(inner)/.array(inner)/.map(inner)/.object(shape)— composites; accumulate child failuresDecoder.tagged.option/either/try/list/map/obj(inner?)— round-trip the{_tag, value}shape used by functype's built-in.toJSON()(for functype-to-functype services)