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]>
119 lines
1.9 KiB
TypeScript
119 lines
1.9 KiB
TypeScript
//// [tests/cases/compiler/awaitInNamespaceExportedClassComputedProperty.ts] ////
|
|
|
|
//// [awaitInNamespaceExportedClassComputedProperty.ts]
|
|
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 {};
|
|
|
|
|
|
//// [awaitInNamespaceExportedClassComputedProperty.js]
|
|
var N;
|
|
(function (N) {
|
|
class A {
|
|
[await x]() { }
|
|
}
|
|
class B {
|
|
[await x]() { }
|
|
static [await x]() { }
|
|
}
|
|
N.B = B;
|
|
})(N || (N = {}));
|
|
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]() { }
|
|
}
|
|
}
|
|
}
|