mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
8e53cbee81
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: RyanCavanaugh <[email protected]> Co-authored-by: Ryan Cavanaugh <[email protected]>
58 lines
818 B
TypeScript
58 lines
818 B
TypeScript
// @target: esnext
|
|
// @module: esnext
|
|
|
|
declare const x: string;
|
|
namespace N {
|
|
class A { [await x]() {} }
|
|
export class B {
|
|
[await x]() {}
|
|
static [await x]() {}
|
|
}
|
|
}
|
|
export class C {
|
|
[await x]() {}
|
|
static [await x]() {}
|
|
}
|
|
|
|
{
|
|
class D { [await x]() {} }
|
|
}
|
|
|
|
function f() {
|
|
class E {
|
|
[await x]() {}
|
|
static [await x]() {}
|
|
}
|
|
}
|
|
|
|
async function af() {
|
|
class F {
|
|
[await x]() {}
|
|
static [await x]() {}
|
|
}
|
|
}
|
|
|
|
function* gf() {
|
|
class G { [await x]() {} }
|
|
}
|
|
|
|
async function* agf() {
|
|
class H { [await x]() {} }
|
|
}
|
|
|
|
function switchSync() {
|
|
switch (0) {
|
|
case 0:
|
|
class I { [await x]() {} }
|
|
}
|
|
}
|
|
|
|
async function switchAsync() {
|
|
switch (0) {
|
|
case 0:
|
|
class J { [await x]() {} }
|
|
}
|
|
}
|
|
|
|
export {};
|