github gcanti/io-ts 0.2.2

latest releases: 2.2.20, 2.2.19, 2.2.18...
7 years ago
  • New Feature
    • add partial combinator (makes optional props possible)
    • add readonly combinator (values are not frozen in production)
    • add readonlyArray combinator (values are not frozen in production)
    • add never type
  • Breaking Changes
    • remove maybe combinator, can be defined in userland as
      export function maybe<RT extends t.Any>(type: RT, name?: string): t.UnionType<[RT, typeof t.null], t.TypeOf<RT> | null> {
        return t.union([type, t.null], name)
      }
  • Polish
    • export pathReporterFailure function from default reporters
  • Bug Fix
    • revert pruning excess properties (see #27 for context)
    • revert intersection combinator accepting only InterfaceTypes
  • Experimental
    • Pattern matching / catamorphism for unions

Don't miss a new io-ts release

NewReleases is sending notifications on new releases.