github runtypes/runtypes v6.0.0

latest releases: v6.7.0, v6.6.0, v6.5.1...
3 years ago

Features

  • Support arbitrary length intersections (#165)
  • Support arbitrary length tuples (#168)
  • Support arbitrary length unions (#166)
  • Support arbitrary length contracts (#202)
  • Support arbitrary length async contracts (#203)
  • Support symbol-keyed properties of object validation (#204)
  • Provide descriptive error messages (#209)

Bug Fixes

  • Add null check into hasKey utility (#205)
  • Add missing readonly to Union function (#208)

BREAKING CHANGES

  • the various Intersect2, Intersect3, ... types have all been replaced with a single Intersect type that takes a tuple of Runtype validators.
  • the various Tuple2, Tuple3, ... types have all been replaced with a single Tuple type that takes a tuple of Runtype validators.
  • the various Union2, Union3, ... types have all been replaced with a single Union type that takes a tuple of Runtype validators.
  • the various Contract2, Contract3, ... types have all been replaced with a single Contract type that takes a tuple of Runtype meaning parameters and a Runtype meaning a return type
  • the various AsyncContract2, AsyncContract3, ... types have all been replaced with a single AsyncContract type that takes a tuple of Runtype meaning parameters and a Runtype meaning a return type of Promise.
  • Dictionary now does not look over non-enumerable properties of tested objects, and Record now does not recognize inherited properties of passed schema

Don't miss a new runtypes release

NewReleases is sending notifications on new releases.