| @@ -1,19 +1,16 @@ |
|
|
| 1 |
1 |
tests/cases/conformance/node/index.ts(1,35): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. |
| 2 |
2 |
tests/cases/conformance/node/otherc.cts(1,35): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. |
| 3 |
|
-tests/cases/conformance/node/otherc.cts(2,40): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. |
| 4 |
3 |
|
| 5 |
4 |
|
| 6 |
5 |
==== tests/cases/conformance/node/index.ts (1 errors) ==== |
| 7 |
6 |
import json from "./package.json" assert { type: "json" }; |
| 8 |
7 |
~~~~~~~~~~~~~~~~~~~~~~~ |
| 9 |
8 |
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. |
| 10 |
|
-==== tests/cases/conformance/node/otherc.cts (2 errors) ==== |
|
9 |
+==== tests/cases/conformance/node/otherc.cts (1 errors) ==== |
| 11 |
10 |
import json from "./package.json" assert { type: "json" }; // should error, cjs mode imports don't support assertions |
| 12 |
11 |
~~~~~~~~~~~~~~~~~~~~~~~ |
| 13 |
12 |
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'. |
| 14 |
13 |
const json2 = import("./package.json", { assert: { type: "json" } }); // should be fine |
| 15 |
|
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 16 |
|
-!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'. |
| 17 |
14 |
==== tests/cases/conformance/node/package.json (0 errors) ==== |
| 18 |
15 |
{ |
| 19 |
16 |
"name": "pkg", |