Releases: mojotech/json-type-validation
Releases · mojotech/json-type-validation
v3.1.0
Minor changes:
Upgrade Notes:
The library now uses TS 3.1 internally, and a number of instances of any
have been replaced with the newer unknown
type. Projects using < [email protected]
will need a polyfill for the unknown type, such as unknown-ts.
v3.0.0
Major changes:
- Remove exported
decoderErrorString
function f21e684 - Do not throw an Error object from
Result.withException
77ad1c3
Minor changes:
- Add
intersection
decoder 678fada - The
array()
decoder with no arguments validatesany[]
d4326b5 - The
object()
decoder with no arguments validates dictionaries withany
values b989a86 - Add
where
decoder method for adding non-type constraints on a decoder fc14fe0
Patch changes:
- Fix missing 'lodash' production dependency 1026a4d
v2.0.0
Major changes:
- Remove
constantTrue
,constantFalse
,constantNull
functions - Functions
constant(true)
andconstant(false)
always have typeDecoder<true>
andDecoder<false>
respectively.
Minor changes:
- Improve error messages for
object
,valueAt
, andoneOf
decoders. - Simplify error messages that have the form "expected X, got Y"
constant
decoder can match constant arrays and objects
Patch changes:
- Fix typos in readme
- Remove unused dependencies