TypeScript/tests/baselines/reference/computedPropertyNames15.js
2015-02-06 18:45:09 -08:00

23 lines
428 B
JavaScript

//// [computedPropertyNames15.ts]
var p1: number | string;
var p2: number | number[];
var p3: string | boolean;
class C {
[p1]() { }
[p2]() { }
[p3]() { }
}
//// [computedPropertyNames15.js]
var p1;
var p2;
var p3;
var C = (function () {
function C() {
}
C.prototype[p1] = function () { };
C.prototype[p2] = function () { };
C.prototype[p3] = function () { };
return C;
})();