-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Disallow assignments to imported exports #2476
Conversation
@@ -7254,14 +7253,37 @@ module ts { | |||
} | |||
} | |||
|
|||
function isImportedNameFromExternalModule(n: Node): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already an inner function so it should be able to refer to the node from the outer function. Why you have to pass it in as function argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is both the question of style (use explicit inputs\outputs for function) and potential optimization opportunities (in theory nested function that does not any captured data can be lifted to a higher scope)
👍 |
stuff['x'] = 1; | ||
stuff.blah = 2; | ||
stuff[n] = 3; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import x = stuff;
👍 |
Disallow assignments to imported exports
Fixes #2456