Cleanup ExportBinding: add constructor methods, push_to, and simplify arms
- Add `ExportBinding::getter`, `::value`, `::getter_setter` constructors to
eliminate the repeated `Box::new(...)` noise at every call site
- Add `ExportBinding::push_to` to encapsulate the array-encoding logic,
collapsing the 25-line if+match push block to a single call
- Simplify `LocalBinding` lookup using `let...else` + `bail!`, removing
the dead `unwrap_or_else` fallback that was unreachable
- Extract `make_assign_target` closure inside `ImportedBinding` to
deduplicate the identical `AssignTarget::Simple(...)` expression
- Use `Module { .. }` instead of listing each ignored field by name
- Break up the long `debug_assert!` line; wrap remaining long lines
- Remove now-unused `SyntaxContext` and `magic_identifier` imports
Co-Authored-By:
Claude <noreply@anthropic.com>
Showing
This diff is collapsed.
Please
register
or
sign in
to comment