- The
bson-uuid-impl
feature now supportsbson::oid::ObjectId
as well (#340) - Allow multile types to have the same
#[ts(export_to = "...")]
attribute and be exported to the same file (#316)
- Properly handle block doc comments (#342)
- Allow using
#[ts(flatten)]
on fields using generic parameters (#336)
#[serde(with = "...")]
requires the use of#[ts(as = "...")]
or#[ts(type = "...")]
(#280)- Fix incompatibility with serde for
snake_case
,kebab-case
andSCREAMING_SNAKE_CASE
(#298) #[ts(rename_all = "...")]
no longer accepts variations in the string's casing, dashes and underscores to make behavior consistent with serde (#298)- Remove
TypeList
, and replaceTS::dependency_types
/TS::generics
withTS::visit_dependencies
/TS::visit_generics
. This finally resolves "overflow evaluating the requirement", "reached the recursion limit" errors. Also, compile times should benefit. This is a technically breaking change for those interacting with theTS
trait directly. For those just using#[derive(TS)]
and#[ts(...)]
, nothing changes!
- Add support for
#[ts(type = "..")]
directly on structs and enums (#286) - Add support for
#[ts(as = "..")]
directly on structs and enums (#288) - Add support for
#[ts(rename_all = "SCREAMING-KEBAB-CASE")]
(#298) - Support
_
in#[ts(type = "..")]
to refer to the type of the field (#299)
- Fix
#[ts(rename_all_fields = "...")]
on enums containing tuple or unit variants (#287) - Fix "overflow evaluating the requirement" and "reached the recursion limit" errors in some cases (#293)
- Fix ambiguity causing "multiple applicable items in scope" errors in some cases (#309)
- Fix issues with absolute
TS_RS_EXPORT_DIR
paths (#323) - Add newlines to the end of exported files (#321)
- Add
#[ts(crate = "..")]
to allow usage of#[derive(TS)]
from other proc-macro crates (#274) - Add support types from
serde_json
behind cargo featureserde-json-impl
(#276)
- Macro expansion for types with generic parameters now works without the
TS
trait in scope (#281) - Fix enum flattening a struct that contains a flattened enum (#282)
- Export types as
type
instead ofìnterface
(#203) - Automatically export all dependencies when using
#[ts(export)]
, addTS::dependency_types()
(#221) - Remove support for "skip_serializing", "skip_serializing_if" and "skip_deserializing". (#204)
- Initially supporting these by skipping a field was a mistake. If a user wishes to skip a field, they can still
annotate it with
#[ts(skip)]
- Initially supporting these by skipping a field was a mistake. If a user wishes to skip a field, they can still
annotate it with
- Added
TS::dependency_types()
(#221) - Added
TS::generics()
(#241) - Added
TS::WithoutGenerics
(#241) - Removed
TS::transparent()
(#243) - Handling of output paths (#247, #250, #256)
- All paths specified using
#[ts(export_to = "...")]
are now relative toTS_RS_EXPORT_DIR
, which defaults to./bindings/
- All paths specified using
- Replace
TS::export
withTS::export
,TS::export_all
andTS::export_to_all
(#263)
- Implement
#[ts(as = "..")]
(#174) - For small arrays, generate tuples instead of
Array<T>
(#209) - Implement
#[ts(optional = nullable)]
(#213) - Allow inlining of fields with generic types (#212, #215, #216)
- Allow flattening enum fields (#206)
- Add
semver-impl
cargo feature with support for the semver crate (#176) - Support
HashMap
with custom hashers (#173) - Add
import-esm
cargo feature to import files with a.js
extension (#192) - Implement
#[ts(...)]
equivalents for#[serde(tag = "...")]
,#[serde(tag = "...", content = "...")]
and#[serde(untagged)]
(#227) - Support
#[serde(untagged)]
on individual enum variants (#226) - Support for
#[serde(rename_all_fields = "...")]
(#225) - Export Rust doc comments/attributes on structs/enums as TSDoc strings (#187)
Result
,Option
,HashMap
andVec
had their implementations ofTS
changed (#241)- Implement
#[ts(...)]
equivalent for#[serde(tag = "...")]
being used on a struct with named fields (#244) - Implement
#[ts(concrete(..))]
to specify a concrete type for a generic parameter (#264)
- Fix
#[ts(skip)]
and#[serde(skip)]
in variants of adjacently or internally tagged enums (#231) rename_all
withcamelCase
produces wrong names if fields were already in camelCase (#198)- Improve support for references (#199)
- Generic type aliases generate correctly (#233)
- Improve compiler errors (#257)
- Update dependencies (#255)