2161e1852f
Closes #44653
34 lines
2.4 KiB
Plaintext
34 lines
2.4 KiB
Plaintext
tests/cases/conformance/node/index.ts(2,11): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
|
|
tests/cases/conformance/node/index.ts(4,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
|
|
tests/cases/conformance/node/subfolder/index.ts(2,11): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
|
|
tests/cases/conformance/node/subfolder/index.ts(4,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
|
|
|
|
|
|
==== tests/cases/conformance/node/subfolder/index.ts (2 errors) ====
|
|
// cjs format file
|
|
const x = await 1;
|
|
~~~~~
|
|
!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
|
|
export {x};
|
|
for await (const y of []) {}
|
|
~~~~~
|
|
!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
|
|
==== tests/cases/conformance/node/index.ts (2 errors) ====
|
|
// esm format file
|
|
const x = await 1;
|
|
~~~~~
|
|
!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
|
|
export {x};
|
|
for await (const y of []) {}
|
|
~~~~~
|
|
!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
|
|
==== tests/cases/conformance/node/package.json (0 errors) ====
|
|
{
|
|
"name": "package",
|
|
"private": true,
|
|
"type": "module"
|
|
}
|
|
==== tests/cases/conformance/node/subfolder/package.json (0 errors) ====
|
|
{
|
|
"type": "commonjs"
|
|
} |