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

19 lines
249 B
TypeScript

// @strict: true
function foo () {
return class<T> {
static [s: string]: number
static [s: number]: 42
foo(v: T) { return v }
}
}
const C = foo()
C.a;
C.a = 1;
C[2];
C[2] = 42;
const c = new C<number>();
c.foo(1);