馃攷 Search Terms
await, namespace, computed property, computed member, TS1308, export class, top-level await
馃晽 Version & Regression Information
This occurs in every version tested: 7.0.2 and 7.1.0-dev.20260802.1 (nightly). I reviewed the FAQ and searched open and closed issues.
馃捇 Code
declare const x: string;
namespace N {
class A { [await x]() {} } // TS1308
export class B { [await x]() {} } // no error
}
export {};
馃檨 Actual behavior
export suppresses TS1308. The emitted await is inside the namespace's synchronous IIFE, producing invalid JavaScript.
馃檪 Expected behavior
Both computed names report TS1308.
馃攷 Search Terms
await,namespace,computed property,computed member,TS1308,export class,top-level await馃晽 Version & Regression Information
This occurs in every version tested: 7.0.2 and
7.1.0-dev.20260802.1(nightly). I reviewed the FAQ and searched open and closed issues.馃捇 Code
馃檨 Actual behavior
exportsuppresses TS1308. The emittedawaitis inside the namespace's synchronous IIFE, producing invalid JavaScript.馃檪 Expected behavior
Both computed names report TS1308.