You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project that has the following (simplified) directory structure:
v1/mod.rs
v2/mod.rs
v3/mod.rs
Each file has a Foo struct, and the main project file has an enum called Foos that has them each as a variant.
When using specta::export::ts_with_cfg(...), the DuplicateTypeName is thrown because of the multiple implementations.
Is there a derive configuration option that allows me to rename the types on the fly?
Is there a way to break out these duplicate types into their own typescript modules/namespaces?
Is there a way to retain directory and file structure based on the inputs (ex: v1/mod.rs types end up in ts/v1.ts etc)?
After digging through the docs/examples/previous issues, it looks like TypeCollection may be my best option here (and manually writing the {version}.d.ts file) - but at the cost of manually registering every offending DuplicateTypeName (which is ~206 per file at this time).
Does this seem like a sane solution, or am I missing something more obvious?
Thanks!
The text was updated successfully, but these errors were encountered:
I have a project that has the following (simplified) directory structure:
Each file has a
Foo
struct, and the main project file has an enum calledFoos
that has them each as a variant.When using
specta::export::ts_with_cfg(...)
, theDuplicateTypeName
is thrown because of the multiple implementations.v1/mod.rs
types end up ints/v1.ts
etc)?After digging through the docs/examples/previous issues, it looks like
TypeCollection
may be my best option here (and manually writing the{version}.d.ts
file) - but at the cost of manually registering every offendingDuplicateTypeName
(which is ~206 per file at this time).Does this seem like a sane solution, or am I missing something more obvious?
Thanks!
The text was updated successfully, but these errors were encountered: