Skip to content

Quote names containing colons in generated .d.ts #4488

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lynn
Copy link
Contributor

@lynn lynn commented Apr 22, 2025

Fixes #4449.

The change to crates/cli/tests/reference/wasm-export-types.rs reproduces the issue in a test. The change to wasm2es6js.rs fixes it.

@lynn lynn changed the title Comment out test exports in generated .d.ts Quote names containing colons in generated .d.ts Apr 22, 2025
Comment on lines -12 to +76
readonly __wbindgen_export_0: WebAssembly.Table;
readonly "__wbgt__reference_test::example_test": (a: number) => void;
readonly __wbgtest_cov_dump: () => [number, number];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The fix is visible here :) __wbgt__reference_test::example_test is quoted now. 🎉

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.

wasm_bindgen_test syntax error at :: in .d.ts ("Expected type")
1 participant