Skip to content

Allow arbitrary expressions in #[ts(export_to)]#399

Merged
gustavo-shigueo merged 4 commits intomainfrom
export_to-using-expression
Apr 4, 2025
Merged

Allow arbitrary expressions in #[ts(export_to)]#399
gustavo-shigueo merged 4 commits intomainfrom
export_to-using-expression

Conversation

@NyxCode
Copy link
Collaborator

@NyxCode NyxCode commented Apr 4, 2025

This is basically @NimonSour's #347 including tests and implemented like #398.
Thanks @NimonSour for the idea & initial implementation!

Docs & Changelog are updated, export-logic remains the same, and unlike #398, everything is 100% backwards-compatible.

Note that this implementation only allows for expressions of whose type implements Display.
That excludes Path and PathBuf. Some more work would need to be done to accept those as well.
If that's needed in the meantime, calling .display() on a Path/PathBuf makes them Display, fixing the issue.

@NyxCode NyxCode requested a review from gustavo-shigueo April 4, 2025 20:54
Copy link
Collaborator

@gustavo-shigueo gustavo-shigueo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gustavo-shigueo gustavo-shigueo merged commit 40b8277 into main Apr 4, 2025
20 checks passed
@gustavo-shigueo gustavo-shigueo deleted the export_to-using-expression branch April 4, 2025 21:17
@gustavo-shigueo gustavo-shigueo mentioned this pull request Nov 5, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants