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

Make API for exporting JS content more explicit #4333

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

RunDevelopment
Copy link
Contributor

This PR brings the improvements to the export function from #4258. Having this change will make implementing another PR easier, so I wanted to make a separate PR for them now.

Change:

  • Instead of trying to detect what kind of expression is being exported from the string value of the JS expression, an enum is used to explicitly spell out what types of expressions the export function supports. It is the responsibility of the caller to ensure the string matches the contract laid out by the ExportJs type. The makes the export function a lot more explicit and easier to change.

This PR is purely internal refactoring and doesn't affect the generated JS in any way.

@daxpedda daxpedda merged commit 720b9fe into rustwasm:main Dec 7, 2024
53 of 54 checks passed
@RunDevelopment RunDevelopment deleted the explicite-export-types branch December 8, 2024 00:54
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