-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Use existing star import instead of adding new import #19628
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
Comments
What if two modules share exported function names, should import order matter? Or should that automatically be an error? So, if I add an exported function in a file, all of a sudden other code can break and fail to compile? This magic will cause code to be much harder to follow, to know where magic functions come from. It will force people to use IDE:s to be at all productive. How about (what probably most ES:ers and TS:ers have tried to do and failed): import * as b, { foo } from "./bar"; I simply cannot understand why the above is not yet legal. It would solve your problem and introduce zero issues. |
We are not planning on adding any new syntax to modules that are not in the ECMAScript standard already. Please see design goals, specifically 6 and 8. |
@mhegazy makes perfect sense, this surely is an upstream (ES) design flaw. But then, changing how it is used (polluting the global scope with magic functions) shouldn't be done either, but you added this to the 2.7 milestone. Why? This is not aligned with point 6. |
I am not sure i understand what you mean.. what changing the scopes, and what is polluting the global scope? |
Well, I'm not sure what the |
@grantila This issue is for an import fix, meaning the sample code in the original post would not compile and would need to be fixed by changing |
From @chrmarti on October 31, 2017 16:58
Testing #37177
Steps to Reproduce:
Copied from original issue: microsoft/vscode#37314
The text was updated successfully, but these errors were encountered: