-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
The proposal for function-like import() is currently in stage-3, and I think it'd be nice if Typescript will support it in future versions.
For example, one such project that already supports it is webpack which checks for import() as a code-splitting construct (deprecating System.import in v2 and replacing it altogether in v3).
TypeScript Version: 2.0.10
Code
// A *self-contained* demonstration of the problem follows...
import('page/profile').then(() => /* load route */ );
Expected behavior:
The compiler allows the dynamic import syntax as above.
Actual behavior:
-> error TS1128: Declaration or statement expected.
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created