runtypes

Runtime validation for static types

MIT License

Stars
2.5K
Committers
43

Bot releases are hidden (Show)

runtypes - v6.7.0 Latest Release

Published by yuhr over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/pelotom/runtypes/compare/v6.6.0...v6.7.0

runtypes - v6.6.0

Published by yuhr about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/pelotom/runtypes/compare/v6.5.1...v6.6.0

runtypes - v6.5.1

Published by yuhr over 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/pelotom/runtypes/compare/v6.5.0...v6.5.1

runtypes - v6.5.0

Published by yuhr almost 3 years ago

What's Changed

Full Changelog: https://github.com/pelotom/runtypes/compare/v6.4.1...v6.5.0

runtypes - v6.4.1

Published by yuhr about 3 years ago

Bug Fixes

  • Enable static types of Optional in Dictionary (#281)
  • Fix return type of top-level match function (#283)
runtypes - v6.4.0

Published by yuhr about 3 years ago

Features

  • Add Template runtype (#279)
runtypes - v6.3.2

Published by yuhr about 3 years ago

Bug Fixes

  • Use globalThis instead of global (#273)

Documentation

  • Add runtyping as a related library (#271)
runtypes - v6.3.1

Published by yuhr over 3 years ago

Bug Fixes

  • Handle null prototypes in failure messaging (#263)

Refactors

  • Unuse unicode option for regex (#245)

Documentation

  • Add more related libraries (#242)
runtypes - v6.3.0

Published by yuhr over 3 years ago

Features

  • Add extend helper function to Record (#239)
  • Add predefined Nullish runtype (#241)
runtypes - v6.2.1

Published by yuhr over 3 years ago

Reverts

  • Revert "Remove workaround for resolved TypeScript issue (#230)" (#233)
runtypes - v6.2.0

Published by yuhr over 3 years ago

Features

  • Introduce Record .pick and .omit (#161)

Bug Fixes

  • Handle objects with null prototypes (#227)

Refactors

  • Remove workaround for resolved TypeScript issue (#230)
  • Use any for internal type assertion (#231)
runtypes - v6.1.0

Published by yuhr over 3 years ago

Features

  • Add nullable shorthand (#226)

Refactors

  • Unuse Exclude internally in static type of Record (#223)
  • Widen type parameter boundary to RuntypeBase (#225)
runtypes - v6.0.0

Published by yuhr over 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
runtypes - v5.2.0

Published by yuhr over 3 years ago

  • Branded types now compatible with declaration option of TS (#196)
  • Remove unnecessary files from packaging result
  • Add Optional runtype (#113)
  • Support symbol key validation (#200)
runtypes - v5.1.0

Published by yuhr over 3 years ago

  • Add BigInt runtype (#185)
  • Add support for generic dictionary key (#193)
runtypes - v5.0.2

Published by yuhr over 3 years ago

  • Docs for branded types (#112)
  • Adds TypeScript 4.2 compatibility
  • Use export type (#177)
runtypes -

Published by pelotom over 4 years ago

  • Fix missing export (#157)
runtypes -

Published by pelotom over 4 years ago

  • Add .asReadonly() for Record and Partial (#153)

BREAKING CHANGE:

This refactors Partial to be just a special case of Record, so it is no longer its own distinct runtype which has to be handled in case analysis of the Reflect type.

runtypes -

Published by pelotom over 4 years ago

  • Fix ValidationError message bug (#134)
  • Fix some code examples in the readme (#140)
  • Update Type guards URL reference (#150)
  • Implement Discriminated Unions (#149)
runtypes -

Published by pelotom over 4 years ago

Add AsyncContract (#122)
Add cycle breaking sets to InternalRecord (#123)
Add tuple 0 and make length check exact. (#124)
Add assert to Runtype. Added typecheck script. (#125)
Add documentation for readonly records and arrays (#126)

Badges
Extracted from project README
License Coverage Status