Releases: joanllenas/ts.data.json
Releases · joanllenas/ts.data.json
v2.2.0
v2.1.1
This release contains a bug fix contributed by @mlocati 🎉
v2.1.0
Feature
- Added
FromDecoder<D>
to infer types from decoder declarations. (docs)
Without FromDecoder
type User = {
firstname: string;
lastname: string;
};
const userDecoder = JsonDecoder.object<User>(
{
firstname: JsonDecoder.string,
lastname: JsonDecoder.string
},
'User'
);
With FromDecoder
const userDecoder = JsonDecoder.object(
{
firstname: JsonDecoder.string,
lastname: JsonDecoder.string
},
'User'
);
type User = FromDecoder<typeof userDecoder>;
v2.0.0
In this release
- Removed deprecated APIs:
Before | After |
---|---|
onDecode() | fold() |
decodePromise() | decodeToPromise() |
then() | chain() |
BREAKING CHANGES
onDecode()
is nowfold()
.decodePromise()
is nowdecodeToPromise()
.then()
is nowchain()
.- Upgraded to TypeScript v4
v1.7.0
In this release
- Readme: Added a Table of Contents
- Readme: Added Decoder API documentation
- Added deprecation warnings for some APIs that will be renamed in the next major version:
Before | After |
---|---|
onDecode() | fold() |
decodePromise() | decodeToPromise() |
then() | chain() |
v1.6.1
Added CJS and ESM builds.