oxc/crates
michaelm 3fcad5e16f
fix(isolated_declarations): Remove nested AssignmentPatterns from inside parameters (#4077)
The default values in destructured parameters are retained in
declarations, which can cause captured variables to be part of the emit
when they shouldn't be. This can also lead to unnecessary isolated
declaration errors when those variables are themselves missing type
annotations and can't be inferred.

For example:
```ts
const x = 42;
const y = '';
export function fooGood3({a = x, b: [{c = y}]}: object): void {}
```

before this change will be emitted as:
```ts
declare const x = 42;
declare const y = '';
export declare function fooGood3({ a = x, b: [{ c = y }] }: object): void;
```

and after this change will be emitted as:
```ts
export declare function fooGood3({ a, b: [{ c }] }: object): void;
```

Co-authored-by: MichaelMitchell-at <=>
2024-07-08 11:06:26 +08:00
..
oxc Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_allocator Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_ast Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_ast_macros Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_cfg Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_codegen fix(codegen): 256 indentations level is not enough for codegen 2024-07-08 00:25:37 +08:00
oxc_diagnostics Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_index Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_isolated_declarations fix(isolated_declarations): Remove nested AssignmentPatterns from inside parameters (#4077) 2024-07-08 11:06:26 +08:00
oxc_js_regex chore: crates should only publish src and examples directory 2024-06-08 16:35:16 +08:00
oxc_language_server refactor(linter): LintContext can now only be constructed with a cfg enabled semantic. (#3761) 2024-06-19 13:01:33 +00:00
oxc_linter fix(linter): incorrect fix in no-single-promise-in-promise-methods rule; (#4094) 2024-07-08 02:34:19 +00:00
oxc_macros chore: do not compile test crates that have no tests 2024-06-24 00:20:04 +08:00
oxc_minifier Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_module_lexer Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_parser Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_prettier feat(ast,codegen): add TSParenthesizedType and print type parentheses correctly (#3979) 2024-06-30 07:57:48 +00:00
oxc_semantic Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_sourcemap Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_span Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_syntax Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_transformer Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_traverse Release crates v0.17.1 (#4075) 2024-07-07 01:29:52 +08:00
oxc_wasm refactor(transformer): pass in symbols and scopes (#3978) 2024-06-30 06:33:48 +00:00