Closed
Description
TypeScript Version: 2.4.1 / nightly (2.5.0-dev.20170629)
Code
import(`./${"module"}`)
Expected behavior:
Output of:
import("./" + "module");
Actual behavior:
Output of:
(import)("./" + "module");
Using "target": "es5"
and "module": "esnext"
, TypeScript outputs invalid syntax for the dynamic import expression, wrapping it in parentheses.
Using a target of es2015
or higher, TypeScript outputs valid syntax with no parentheses.
This is only happens if import
is given a template string.
Metadata
Metadata
Assignees
Labels
No labels