1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
//// [staticIndexSignature4.ts]
class B {
static readonly [s: string]: number;
static readonly [s: number]: 42 | 233
}
class D {
static [s: string]: number;
static [s: number]: 42 | 233
}
interface IB {
static [s: string]: number;
static [s: number]: 42 | 233;
}
declare const v: number
declare const i: IB
if (v === 0) {
B.a = D.a
B[2] = D[2]
} else if (v === 1) {
D.a = B.a
D[2] = B[2]
} else if (v === 2) {
B.a = i.a
B[2] = i[2]
D.a = i.a
D[2] = i [2]
} else if (v === 3) {
i.a = B.a
i[2] = B[2]
} else if (v === 4) {
i.a = D.a
i[2] = B[2]
}
//// [staticIndexSignature4.js]
"use strict";
var B = /** @class */ (function () {
function B() {
}
return B;
}());
var D = /** @class */ (function () {
function D() {
}
return D;
}());
if (v === 0) {
B.a = D.a;
B[2] = D[2];
}
else if (v === 1) {
D.a = B.a;
D[2] = B[2];
}
else if (v === 2) {
B.a = i.a;
B[2] = i[2];
D.a = i.a;
D[2] = i[2];
}
else if (v === 3) {
i.a = B.a;
i[2] = B[2];
}
else if (v === 4) {
i.a = D.a;
i[2] = B[2];
}
|