swc/crates/swc_ecma_parser/tests/tsc/staticIndexSignature1.ts
2022-02-04 17:08:38 +09:00

11 lines
156 B
TypeScript

class C {
static [s: string]: number;
static [s: number]: 42
}
C["foo"] = 1
C.bar = 2;
const foo = C["foo"]
C[42] = 42
C[2] = 2;
const bar = C[42]