Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Export in the same file #296

Closed
tymmesyde opened this issue Apr 5, 2024 · 4 comments
Closed

Feature request: Export in the same file #296

tymmesyde opened this issue Apr 5, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@tymmesyde
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I would like to export multiple types in the same file instead of creating a file for each
Or this is this currently achievable?

Describe the solution you'd like
Something like #[ts(export_to_single_file)] that exports every types related to this container into the same file

Describe alternatives you've considered
It could work with #[ts(export_to = "Setting.ts")], but currently it overrides the content if i declare this multiple times

Additional context

@tymmesyde tymmesyde added the enhancement New feature or request label Apr 5, 2024
@seanpianka
Copy link

Likewise, I'd like to see this feature as well! Now that #[ts(export, export_to = "myfile.ts")] will automatically export types present in the fields of the type (that derive TS), it would be helpful if those types would be exported to the same file as the root/top-level containing type.

@escritorio-gustavo
Copy link
Contributor

Duplicate of #59

@escritorio-gustavo escritorio-gustavo marked this as a duplicate of #59 Apr 8, 2024
@escritorio-gustavo
Copy link
Contributor

We can't quite do this yet because our exports are generated though tests, which run in parallel and completely out of our control, so we can't really sync exporting in a way that would allow this to work

@gustavo-shigueo
Copy link
Collaborator

Describe alternatives you've considered
It could work with #[ts(export_to = "Setting.ts")], but currently it overrides the content if i declare this multiple times

Please checkout #316! It implements this very feature, and I'd like to have some users' feedback to make sure it doesn't break things before merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants