mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-23 10:29:01 -06:00
Adress review comments
This commit is contained in:
parent
5b846856c2
commit
89d2baede7
@ -28103,7 +28103,7 @@ namespace ts {
|
||||
|
||||
function checkGrammarImportCallExpression(node: ImportCall): boolean {
|
||||
if (moduleKind === ModuleKind.ES2015) {
|
||||
return grammarErrorOnNode(node, Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules_Please_use_esnext_or_commonjs_as_module_compiler_option);
|
||||
return grammarErrorOnNode(node, Diagnostics.Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext);
|
||||
}
|
||||
|
||||
if (node.typeArguments) {
|
||||
|
||||
@ -895,7 +895,7 @@
|
||||
"category": "Error",
|
||||
"code": 1322
|
||||
},
|
||||
"Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.": {
|
||||
"Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.": {
|
||||
"category": "Error",
|
||||
"code": 1323
|
||||
},
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/dynamicImport/1.ts(1,1): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
tests/cases/conformance/dynamicImport/1.ts(8,16): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
tests/cases/conformance/dynamicImport/1.ts(1,1): error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
tests/cases/conformance/dynamicImport/1.ts(8,16): error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ====
|
||||
@ -9,10 +9,10 @@ tests/cases/conformance/dynamicImport/1.ts(8,16): error TS1323: Dynamic import c
|
||||
==== tests/cases/conformance/dynamicImport/1.ts (3 errors) ====
|
||||
import("./0");
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
!!! error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
var p1 = import("./0");
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
!!! error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
p1.then(zero => {
|
||||
return zero.foo();
|
||||
})
|
||||
@ -20,5 +20,5 @@ tests/cases/conformance/dynamicImport/1.ts(8,16): error TS1323: Dynamic import c
|
||||
function foo() {
|
||||
const p2 = import("./0");
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
!!! error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/dynamicImport/index.ts(2,18): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
tests/cases/conformance/dynamicImport/index.ts(2,18): error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/dynamicImport/foo.ts (0 errors) ====
|
||||
@ -9,7 +9,7 @@ tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic impo
|
||||
async function foo() {
|
||||
return await import((await import("./foo")).default);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
!!! error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
!!! error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/dynamicImport/index.ts(2,18): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
tests/cases/conformance/dynamicImport/index.ts(2,18): error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/dynamicImport/foo.ts (0 errors) ====
|
||||
@ -9,7 +9,7 @@ tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic impo
|
||||
async function foo() {
|
||||
return await import((await import("./foo")).default);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
!!! error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. Please use 'esnext' or 'commonjs' as module compiler option.
|
||||
!!! error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user