mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 23:27:56 +03:00
11 lines
174 B
TypeScript
11 lines
174 B
TypeScript
|
class C {
|
||
|
static readonly [s: string]: number;
|
||
|
static readonly [s: number]: 42
|
||
|
}
|
||
|
|
||
|
C["foo"] = 1
|
||
|
C.bar = 2;
|
||
|
const foo = C["foo"]
|
||
|
C[42] = 42
|
||
|
C[2] = 2;
|
||
|
const bar = C[42]
|