v9.0.0
While v9.0.0 is a technically breaking change, we expect it to be a drop-in replacement for almost all users.
Only code interacting with TS::dependency_types
and TS::generics
will need to be adjusted.
What's new?
Removal of TypeList
The biggest change of v9.0.0 is an internal one: We removed TypeList
from the API.
This fixes the long-standing issue of complex types failing to compile with
overflow evaluating the requirement
orreached the recursion limit
Even if you did not run into those, we do expect this change to also improve compilation times.
Allow for _
in #[ts(as = "..")]
Similar to how it works in serde, _
can be used in #[ts(as = "..")]
to refer to the type of the field.
This is particularly useful for more complex type overrides.
Allow #[ts(as = "..")]
and #[ts(type = "..")]
on structs and enums
These two attributes can now be used directly on structs and enums.
Previously, it was necessary to add these attributes on every field where the type was used.
This feature is particularly useful for exposing newtypes transparently.
To see a list of all changes, check out CHANGELOG.md!
All changes
- Release 8.1.0 by @NyxCode in #283
- add support for top level type overrides by @dr-bonez in #286
- Fix
#[ts(rename_all_fields = "...")]
on enums containing tuple or unit variants by @escritorio-gustavo in #287 - add support for top level
as
by @dr-bonez in #288 - Prevent empty
Dependencies
from being added todependency_types
by @escritorio-gustavo in #291 - Rework attribute parsing by @escritorio-gustavo in #290
- Add MSRV to cargo.toml and README by @escritorio-gustavo in #300
- Fix race condition in imports test by @escritorio-gustavo in #302
- Fix inconsistencies with
serde
and addSCREAMING-KEBAB-CASE
by @escritorio-gustavo in #298 - Support
#[serde(with = "...")]
for struct fields by @escritorio-gustavo in #280 - dedup dependencies by @kamadorueda in #293
- Fix location of rename_all errors by @escritorio-gustavo in #303
- Infered types (
_
) in#[ts(as = "...")]
by @escritorio-gustavo in #299 - Track
Cargo.lock
files to improve CI speed by @escritorio-gustavo in #295 - Fix #308 by @NyxCode in #309
- Fix missing case in #299 by @escritorio-gustavo in #310
- Coerce passed type to TS before invoking ::name() by @paultag in #318
- Recusion Limit - Round 2 by @NyxCode in #306
- Testing with --no-default-features didnt seem to work in CI by @NyxCode in #319
- Insert newline at end of generated files by @lucperkins in #321
- bug: Fix issue with absolute paths by @escritorio-gustavo in #323
New Contributors
- @dr-bonez made their first contribution in #286
- @kamadorueda made their first contribution in #293
- @paultag made their first contribution in #318
- @lucperkins made their first contribution in #321
Full Changelog: v8.1.0...v9.0.0