de23842e45
* Allow import assertions on esm imports under module: nodenext * Changes to copy Co-authored-by: Andrew Branch <andrew@wheream.io>
30 lines
2.1 KiB
Plaintext
30 lines
2.1 KiB
Plaintext
tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(5,8): error TS1325: Argument of dynamic import cannot be spread element.
|
|
tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(7,17): error TS1325: Argument of dynamic import cannot be spread element.
|
|
tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(8,12): message TS1450: Dynamic imports can only accept a module specifier and an optional assertion as arguments
|
|
tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS2307: Cannot find module 'pathToModule' or its corresponding type declarations.
|
|
tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,35): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
|
|
tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,35): error TS2559: Type '"secondModule"' has no properties in common with type 'ImportCallOptions'.
|
|
|
|
|
|
==== tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts (6 errors) ====
|
|
declare function getSpecifier(): string;
|
|
declare var whatToLoad: boolean;
|
|
|
|
var a = ["./0"];
|
|
import(...["PathModule"]);
|
|
~~~~~~~~~~~~~~~~~
|
|
!!! error TS1325: Argument of dynamic import cannot be spread element.
|
|
|
|
var p1 = import(...a);
|
|
~~~~
|
|
!!! error TS1325: Argument of dynamic import cannot be spread element.
|
|
const p2 = import();
|
|
~~~~~~~~
|
|
!!! message TS1450: Dynamic imports can only accept a module specifier and an optional assertion as arguments
|
|
const p4 = import("pathToModule", "secondModule");
|
|
~~~~~~~~~~~~~~
|
|
!!! error TS2307: Cannot find module 'pathToModule' or its corresponding type declarations.
|
|
~~~~~~~~~~~~~~
|
|
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
|
|
~~~~~~~~~~~~~~
|
|
!!! error TS2559: Type '"secondModule"' has no properties in common with type 'ImportCallOptions'. |