Releases: runtypes/runtypes
Releases · runtypes/runtypes
v6.2.0
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)
v6.1.0
Features
- Add
nullable
shorthand (#226)
Refactors
- Unuse
Exclude
internally in static type of Record
(#223)
- Widen type parameter boundary to
RuntypeBase
(#225)
v6.0.0
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
v5.2.0
- 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)
v5.1.0
- Add
BigInt
runtype (#185)
- Add support for generic dictionary key (#193)
v5.0.2
- Docs for branded types (#112)
- Adds TypeScript 4.2 compatibility
- Use
export type
(#177)
v5.0.1
- Fix missing export (#157)
v5.0.0
- 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.
v4.3.0
- Fix ValidationError message bug (#134)
- Fix some code examples in the readme (#140)
- Update Type guards URL reference (#150)
- Implement Discriminated Unions (#149)
v4.2.0
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)