**Description:**
`EsConfig` and `TsConfig` sound like a general configuration for the whole language, while actually it's only about parsing.
To avoid a breaking change, I created type aliases that will work without changing the code, while warning the users.
**Related issue:**
- Closes#9089.
**Description:**
add DefaultDecl's FnExpr and ClassExpr's ident to bindings.
because all of them should be treated as hoisted Fn/Class Declare
```txt
× the name `x` is defined multiple times
╭─[examples/all.js:1:1]
1 │ export default class x{}
· ┬
· ╰── previous definition of `x` here
2 │
3 │ let x = 1;
· ┬
· ╰── `x` redefined here
4 │ let t = function x(){};
╰────
```
**Related issue:**
- Closes#8755
# API Changes
## `swc_ecma_utils`
### Renames
- `find_ids` => `find_pat_ids`
- `prepend` => `prepend_stmt`
- `as_bool` => `cast_to_bool`
- `as_number` => `as_pure_number`
- `as_string` => `cast_to_string`
- (`as_pure_bool`, `cast_to_number` is not renamed)
- `UsageFinder` => `IdentUsageFinder`.
- `IdentFinder` => `IdentRefFinder`.
## Changes
- Re-export of `HANDLER` from `swc_common::errors` is removed. Use `swc_common::error::HANDLER` instead.
- Re-export of `Id` from `swc_ecma_ast` is removed. Use `swc_ecma_ast::Id` instead.
- `ExprCtx` is used for apis related to `Expr`.
- `preserve_effects` is now a method of `ExprCtx`. It was a top-level function.
- `extract_side_effects_to` is now a method of `ExprCtx`. It was a top-level function.
- `IdentUsageFinder` (previously `UsageFinder`) now takes `Id` instead of `Ident`.
- `IdentRefFinder` (previously `IdentFinder`) now takes `Id` instead of `Ident`.
- `ExprExt::is_ident_ref_to` is removed.
- `Expr::is_global_ref_to` is added.
- `:🆔:id` is removed. Use `Ident::to_id()` instead.
- We don't need a list of bindings to check if an identifier is unresolved.
- Checking if an identifier is unresolved is now one CPU instruction.
- Previously it was one hashmap operation.
- This PR also improves performance, by removing the hashmaps mentioned above.
swc_ecma_transforms_base:
- `resolver`: Fix resolving of `const` and `let`.
swc_ecma_lints:
- `duplicate_bindings`: Don't mark ambient function declararions as a binding. (Closes#3193)