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

register import equals specifier #10710

Merged
merged 1 commit into from Nov 18, 2019
Merged

register import equals specifier #10710

merged 1 commit into from Nov 18, 2019

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Nov 14, 2019

Q                       A
Fixed Issues? Fixes #10042
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

In this PR we register the import equals specifier so that it would not throw if it appears in an export named declaration later.

Note that we does not support transforming ImportEqualsDeclaration yet, but we should be able to parse it.

Credits to @jj-choi

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: parser area: typescript labels Nov 14, 2019
@nicolo-ribaudo
Copy link
Member

Credits to @jj-choi

Note that you can mark them as "co-author" of the commit

Co-authored-by: <jaejoon.choi>
@JLHwung
Copy link
Contributor Author

JLHwung commented Nov 14, 2019

Rebased upstream/master onto e1839e5 so that the CI build would not be affected by eslint packages. 😂

@@ -1292,6 +1293,12 @@ export default (superClass: Class<Parser>): Class<Parser> =>
): N.TsImportEqualsDeclaration {
node.isExport = isExport || false;
node.id = this.parseIdentifier();
this.checkLVal(
node.id,
BIND_LEXICAL,
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export is not defined error for TSImportEqualsDeclaration
3 participants