Skip to content

Releases: peter-leonov/type-predicate-generator

v1.0.3

27 Jan 23:37
Compare
Choose a tag to compare
  • enabled checks for never to avoid cases when a series of TS predicates narrows a type down to never which is a bug
  • added lots of comments to the generated code
  • optimized the special case when an array has only one type and it's an alias, before the fix Generator would create a no-op wrapper function, now it uses the external predicate directly
  • fixed a rare but still possible root type vs nested type collision
  • published the in-depth comparison article

v1.0.2

22 Jan 09:23
Compare
Choose a tag to compare
  • removed unused SafeShallowShape when there is no object types to verify
  • improved unsupported types error message with adding the source file and type name
  • fixed typos in code and messages

v1.0.1

16 Jan 20:28
Compare
Choose a tag to compare
  • Generator now errors out when a referenced type is not exported or otherwise cannot get a predicate for it.
  • Generator does not produce helper functions when not used to avoid TS complaining about unused variables.
  • The inner types created for inner predicates got better names.

v1.0.0

15 Jan 16:57
Compare
Choose a tag to compare

Initial release with all the expected functions: nested objects, arrays of any type, recursive types, unions (including limited support for unions with objects), error reporting, CLI error messages and more.