New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@typed/decoder

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typed/decoder

This module provides an interface `Decoder` much like the experimental module from [io-ts](https://github.com/gcanti/io-ts) with support for fp-ts v3 including [@effect/schema](https://github.com/fp-ts/schema). It's signature follows directly that

Source
npmnpm
Version
0.12.1
Version published
Weekly downloads
76
-55.56%
Maintainers
1
Weekly downloads
 
Created
Source

@typed/decoder

This module provides an interface Decoder<I, O> much like the experimental module from io-ts with support for fp-ts v3 including @effect/schema. It's signature follows directly that of @effect/schema's output from Parser.decode(Schema) allowing for seamless interoperation from Schema to Decoder. Once in Decoder land, you can compose into larger Decoders and apply transformations to its output using its Covariant instance instead of the Invariant instance of Schema. Because of this difference, it is not usually possible to go back to a Schema unless it was created directly using fromSchema<A>(schema: Schema<A>): SchemaDecoder<A>.

FAQs

Package last updated on 12 Aug 2023

Related posts