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
So one of the tiny silliest things when writing in typescript is that completion for import statements.
The ES6 spec suggests that import statements should look like this:
importsomeFuncfrom'./someFunc';
That spec was apparently designed to be an alternative to var someFunc = require('./someFunc');. They clearly didn't have autocompletion in mind, which is one of the best features in TS.
My suggestion is introducing a new syntax to import files in Typescript that better suites the purposes of the language.
from'./someFunc'importsomeFunc;
And the same thing should apply to "export from" statements.
from'./someFile'export*;
In fact this issue is so annoying it got mentioned in this year's //build/ conf.
The text was updated successfully, but these errors were encountered:
I'm sorry I haven't seen those earlier. Reading your comments there I think I get why it's the case. We should probably request this in ES7 or something.
Cheers!
So one of the tiny silliest things when writing in typescript is that completion for import statements.
The ES6 spec suggests that import statements should look like this:
That spec was apparently designed to be an alternative to
var someFunc = require('./someFunc');
. They clearly didn't have autocompletion in mind, which is one of the best features in TS.My suggestion is introducing a new syntax to import files in Typescript that better suites the purposes of the language.
And the same thing should apply to "export from" statements.
In fact this issue is so annoying it got mentioned in this year's //build/ conf.
The text was updated successfully, but these errors were encountered: