mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 19:52:21 +03:00
19 lines
249 B
TypeScript
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);
|