mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
24 lines
1.3 KiB
Plaintext
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.
|
|
}
|
|
|