mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
25 lines
541 B
Plaintext
25 lines
541 B
Plaintext
//// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsTopLevelAwait.ts] ////
|
|
|
|
=== subfolder/index.js ===
|
|
// cjs format file
|
|
const x = await 1;
|
|
>x : Symbol(x, Decl(index.js, 1, 5))
|
|
|
|
export {x};
|
|
>x : Symbol(x, Decl(index.js, 2, 8))
|
|
|
|
for await (const y of []) {}
|
|
>y : Symbol(y, Decl(index.js, 3, 16))
|
|
|
|
=== index.js ===
|
|
// esm format file
|
|
const x = await 1;
|
|
>x : Symbol(x, Decl(index.js, 1, 5))
|
|
|
|
export {x};
|
|
>x : Symbol(x, Decl(index.js, 2, 8))
|
|
|
|
for await (const y of []) {}
|
|
>y : Symbol(y, Decl(index.js, 3, 16))
|
|
|