from './foo' import './foo';
Bob Myers
rtm at gol.com
Tue Apr 10 03:46:11 UTC 2018
You're seriously underestimating how smart IDEs are or can be.
Some IDEs are already suggesting the entire import statement when a symbol
is used, based on what's in other modules, package.json, etc.
There's no reason why an IDE can't auto-suggest the import name based on
undefined symbols in the file, among other things.
There's also no compelling reason why you can't type `import {} from
"module";`, then go back and fill in the symbol name inside the `{}`.
You could use a snippet manager to make this semi-painless, defining the
snippet as something like `import {$2} from "$1";`.
Bob
On Tue, Apr 10, 2018 at 8:48 AM, Vladimir Vapirov <
vladimir.vapirov at gmail.com> wrote:
> I had the same idea coming from Python to JS. Current import syntax
> doesn’t allow IDE’s to hint which functions/modules are available for
> import.
>
> Please see my proposal and let me know your thoughts
>
> https://github.com/vladi-dev/proposal-reverse-import-syntax
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180410/34ff375a/attachment.html>
More information about the es-discuss
mailing list