gcanti / io-ts-types

A collection of codecs and combinators for use with io-ts
https://gcanti.github.io/io-ts-types/
MIT License
311 stars 40 forks source link

Improve documentation for `fromNewtype` #179

Open d-eisenga opened 1 year ago

d-eisenga commented 1 year ago

📖 Documentation

The documentation for fromNewtype only shows how to use it with an alias for t.string, i.e. a type that doesn't have a custom type predicate. It's entirely unclear how to use it with e.g. the NonNegative newtype, which has a custom predicate.