mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
#7872 implements renaming symbols in constructor which shadow references in instance property initializers. But we don't need to rename where the reference in initializer references a symbol which is bound within the initializer itself. Input: ```js class C { double = n => n * 2; constructor(n) { console.log(n); } } ``` Output: ```js class C { constructor(n) { // <-- not renamed this.double = n => n * 2; // <-- moved into constructor console.log(n); // <-- not renamed } } ``` This produces better output, and avoids a traversal of constructor's AST renaming symbols. |
||
|---|---|---|
| .. | ||
| ast_tools | ||
| benchmark | ||
| common | ||
| compat_data | ||
| coverage | ||
| javascript_globals | ||
| lint_rules | ||
| minsize | ||
| prettier_conformance | ||
| rulegen | ||
| transform_checker | ||
| transform_conformance | ||
| website | ||