Skip to content

Releases: RateGravity/type-shift

v0.4.0

09 Feb 17:06
27e2bc5
Compare
Choose a tag to compare

What's Changed

  • Update 'none' converter types to be more explicit by @RoboCafaz in #55

Full Changelog: v0.3.1...v0.4.0

v0.3.1

09 May 16:05
9f04471
Compare
Choose a tag to compare

No changes, retriggering the release after switch to GitHub actions/NPM

v0.3.0

29 Mar 16:06
12c155e
Compare
Choose a tag to compare

What's Changed

  • Proposal: Do not allow shape or strict converters to omit optional fields. by @RoboCafaz in #45

Full Changelog: v0.2.3...v0.3.0

Allow readonly arrays to be used for `t.oneOf`

20 Mar 16:04
b289859
Compare
Choose a tag to compare

What's Changed

  • Allow readonly arrays to be used for t.oneOf by @RoboCafaz in #46

New Contributors

Full Changelog: v0.2.2...v0.2.3

Fix ConverterError not setting a name

22 Mar 17:23
a756e06
Compare
Choose a tag to compare

Thrown converter errors will now have their error name as "ConverterError".

Fix Relative Parent Path

06 Aug 14:11
e4a3635
Compare
Choose a tag to compare

When using t.forPath with only parent paths we jumped to the root object, this is both wrong and non-intuitive. Now we go up the number of steps that are requested.

Create generic functionality for coercing values

07 Jun 18:50
1d20b7f
Compare
Choose a tag to compare

To handle empty values (null/undefined) there is now a None data type, which is exposed as a primitive t.none. When creating an optional parameter that can take null or undefined you can use t.noneable(t.string). If you would like to coerce that value to null or undefined you can use t.noneableAsNull and t.noneableAsUndefined respectively.

Improvements to Or Joined Errors

09 Oct 14:05
1013716
Compare
Choose a tag to compare

Errors with or joins now try to select which branch to report an error from.
Where possible using a tagged union is still preferred.

Updates to Optional to make Errors Better

30 Jun 22:07
9d8429c
Compare
Choose a tag to compare

Optionals are no longer backed by an or join which was hiding the real error.

Fixes to Exported Typing

02 Jun 15:23
6c37060
Compare
Choose a tag to compare

Fixes the export of the Null Converter.