2015-02-03 02:36:45 +01:00
|
|
|
//// [computedPropertyNames15_ES6.ts]
|
2015-01-14 01:10:24 +01:00
|
|
|
var p1: number | string;
|
|
|
|
var p2: number | number[];
|
|
|
|
var p3: string | boolean;
|
|
|
|
class C {
|
|
|
|
[p1]() { }
|
|
|
|
[p2]() { }
|
|
|
|
[p3]() { }
|
|
|
|
}
|
|
|
|
|
2015-02-03 02:36:45 +01:00
|
|
|
//// [computedPropertyNames15_ES6.js]
|
2015-01-14 01:10:24 +01:00
|
|
|
var p1;
|
|
|
|
var p2;
|
|
|
|
var p3;
|
|
|
|
var C = (function () {
|
|
|
|
function C() {
|
|
|
|
}
|
2015-02-07 03:45:09 +01:00
|
|
|
C.prototype[p1] = function () { };
|
|
|
|
C.prototype[p2] = function () { };
|
|
|
|
C.prototype[p3] = function () { };
|
2015-01-14 01:10:24 +01:00
|
|
|
return C;
|
|
|
|
})();
|