Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(es/typescript): Handle DeclareCollect correctly #8008

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

magic-akari
Copy link
Member

@magic-akari magic-akari commented Sep 26, 2023

Description:

BREAKING CHANGE:

Related issue (if exists):

@magic-akari
Copy link
Member Author

magic-akari commented Sep 26, 2023

This will fix #8007.

  • I'll check if any other visitors should be skipped.

@magic-akari magic-akari marked this pull request as ready for review September 26, 2023 16:54
@magic-akari
Copy link
Member Author

fn visit_binding_ident(&mut self, n: &BindingIdent) {
self.id_value.insert(n.to_id());
}
fn visit_var_declarator(&mut self, n: &VarDeclarator) {
n.name.visit_with(self);
}
fn visit_assign_pat_prop(&mut self, n: &AssignPatProp) {
self.id_value.insert(n.key.to_id());
}

fn visit_binding_ident(&mut self, n: &BindingIdent) {
self.export_list.push(n.to_id());
}
fn visit_assign_pat_prop(&mut self, n: &AssignPatProp) {
self.export_list.push(n.key.to_id());
n.visit_children_with(self);
}

It would be better if AssignPatProp.key was BindingIdent.

@Kamahl19
Copy link

thanks @magic-akari !

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swc-bump:

  • swc_ecma_transforms_typescript

@kdy1 kdy1 merged commit 9d08b8a into swc-project:main Sep 26, 2023
127 checks passed
@kdy1 kdy1 modified the milestones: Planned, v1.3.90 Sep 26, 2023
@magic-akari magic-akari deleted the fix/issue-8007 branch September 27, 2023 07:09
@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

v1.3.89 causes "ReferenceError: theme is not defined" in Antd design
3 participants