You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suppose, that's what TypeScript technically emits and it'd be up to the module author. Personally I wouldn't merge a PR or accept an issue for it, but maybe others would. I wouldn't push for it personally since I definitely don't want to spam a bunch of people who don't care about this when there's already valid ways to use the code. Also, that hack may also break one day - hard to tell if real ES6 support lands what it'll look like anyway but it looks likely that in this year it will need to be solved.
Let's not merge namespace hacks so people can use "ES6-style imports" with CommonJS code. Remember to point out when someone is using an import incorrectly. I'm adding this issue mostly as a bookmark for future reference, since I commonly write something up like typed-typings/npm-basic-auth#1 (comment). There's a good answer on Stack Overflow by Ryan we can point people to now - https://stackoverflow.com/questions/39415661/why-cant-i-import-a-class-or-function-with-import-as-x-from-y 👍
The text was updated successfully, but these errors were encountered: