Files
tsgo/testdata/baselines/reference/submodule/conformance/awaitUsingDeclarations.16.errors.txt
2025-10-04 15:49:05 +00:00

24 lines
1.3 KiB
Plaintext

awaitUsingDeclarations.16.ts(2,5): error TS1546: 'await using' declarations are not allowed in ambient contexts.
awaitUsingDeclarations.16.ts(3,5): error TS1546: 'await using' declarations are not allowed in ambient contexts.
awaitUsingDeclarations.16.ts(6,5): error TS1546: 'await using' declarations are not allowed in ambient contexts.
awaitUsingDeclarations.16.ts(7,5): error TS1546: 'await using' declarations are not allowed in ambient contexts.
==== awaitUsingDeclarations.16.ts (4 errors) ====
declare namespace N {
await using x: { [Symbol.asyncDispose](): Promise<void> };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1546: 'await using' declarations are not allowed in ambient contexts.
await using y: null;
~~~~~~~~~~~~~~~~~~~
!!! error TS1546: 'await using' declarations are not allowed in ambient contexts.
}
declare module 'M' {
await using x: { [Symbol.asyncDispose](): Promise<void> };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1546: 'await using' declarations are not allowed in ambient contexts.
await using y: null;
~~~~~~~~~~~~~~~~~~~
!!! error TS1546: 'await using' declarations are not allowed in ambient contexts.
}