Skip to content

Commit

Permalink
Exact description
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Dec 8, 2024
1 parent e8bc858 commit 5f7f7b1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@

### Fixed

- Fixed JS keyword-like identifiers not being handled correctly. Keywords on imports will no longer be escaped. Using keyword identifiers in places that caused invalid JS code gen will now error at compile time.
- Fixed using [JavaScript keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#keywords) as identifiers not being handled correctly.
[#4329](https://github.com/rustwasm/wasm-bindgen/pull/4329)

- Using JS keywords as `struct` and `enum` names will now error at compile time, instead of causing invalid JS code gen.
- Using JS keywords that are not valid to call or access properties on will now error at compile time, instead of causing invalid JS code gen if used as:
1. The first part of a `js_namespace` on imports.
2. The name of an imported type or constant if the type or constant does not have a `js_namespace` or `module` attribute.
3. The name of an imported function if the function is not a method and does not have a `js_namespace` or `module` attribute.
- Using JS keywords on imports in places other than the above will no longer cause the keywords to be escaped as `_{keyword}`.

--------------------------------------------------------------------------------

## [0.2.99](https://github.com/rustwasm/wasm-bindgen/compare/0.2.98...0.2.99)
Expand Down

0 comments on commit 5f7f7b1

Please sign in to comment.