mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-11 20:37:46 -05:00
Issue error when use with ES2015
This commit is contained in:
@@ -14863,6 +14863,10 @@ namespace ts {
|
||||
}
|
||||
|
||||
function checkImportCallExpression(node: ImportCallExpression): Type {
|
||||
if (modulekind === ModuleKind.ES2015) {
|
||||
grammarErrorOnNode(node, Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules);
|
||||
}
|
||||
|
||||
// resolveExternalModuleName will return undefined if the moduleReferenceExpression is not a string literal
|
||||
const moduleSymbol = resolveExternalModuleName(node, node.specifier);
|
||||
if (moduleSymbol) {
|
||||
|
||||
@@ -867,6 +867,10 @@
|
||||
"category": "Error",
|
||||
"code": 1319
|
||||
},
|
||||
"Dynamic import cannot be used when targeting ECMAScript 2015 modules.": {
|
||||
"category": "Error",
|
||||
"code": 1320
|
||||
},
|
||||
"Duplicate identifier '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2300
|
||||
@@ -1863,10 +1867,6 @@
|
||||
"category": "Error",
|
||||
"code": 2649
|
||||
},
|
||||
"Cannot emit namespaced JSX elements in React.": {
|
||||
"category": "Error",
|
||||
"code": 2650
|
||||
},
|
||||
"A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums.": {
|
||||
"category": "Error",
|
||||
"code": 2651
|
||||
|
||||
Reference in New Issue
Block a user