Closed HalfVoxel closed 1 month ago
Thanks for opening the issue!
I think I found & fixed that bug in https://github.com/Aleph-Alpha/ts-rs/pull/306#discussion_r1561517414.
I'll try to get the PR merged as soon as I find some time. In the meantime, could you try that branch, and see if it fixes your issue?
ts-rs = { git = "https://github.com/Aleph-Alpha/ts-rs", branch="better-dependencies", features = ["uuid-impl", "chrono-impl"]}
Thanks!
Thanks! I have already done a workaround in my project, but it definitely looks like that commit will fix the issue. Though, of course, I'd recommend adding a unit test to make sure it never happens again :)
Feel free to close when that PR is merged.
fixed in #306
Thanks. Minor note. The test you added seems to only ensure it can be exported without any errors, but it doesn't actually validate that the output has the imports that this issue mentioned was missing.
It does - our CI runs tsc over all outputs.
Describe the bug
When exporting a struct with the following field:
It is exported as:
But there are no imports for the
VariantId
andVariantOverview
types. Imports for other things work correctly.Expected behavior The generated typescript file has the required imports.
Version
This started appearing when upgrading to version 8.