Releases: peter-leonov/type-predicate-generator
Releases · peter-leonov/type-predicate-generator
v1.0.3
- enabled checks for
never
to avoid cases when a series of TS predicates narrows a type down tonever
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
- 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
- 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
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.