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
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.
The text was updated successfully, but these errors were encountered:
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
Expected behavior:
The compiler allows the dynamic import syntax as above.
Actual behavior:
-> error TS1128: Declaration or statement expected.
The text was updated successfully, but these errors were encountered: