2015-02-04 02:43:31 +01:00
|
|
|
//// [computedPropertyNames2_ES5.ts]
|
|
|
|
var methodName = "method";
|
|
|
|
var accessorName = "accessor";
|
|
|
|
class C {
|
|
|
|
[methodName]() { }
|
|
|
|
static [methodName]() { }
|
|
|
|
get [accessorName]() { }
|
|
|
|
set [accessorName](v) { }
|
|
|
|
static get [accessorName]() { }
|
|
|
|
static set [accessorName](v) { }
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [computedPropertyNames2_ES5.js]
|
|
|
|
var methodName = "method";
|
|
|
|
var accessorName = "accessor";
|
|
|
|
var C = (function () {
|
|
|
|
function C() {
|
|
|
|
}
|
2015-02-07 03:45:09 +01:00
|
|
|
C.prototype[methodName] = function () { };
|
|
|
|
C[methodName] = function () { };
|
2015-02-04 02:43:31 +01:00
|
|
|
Object.defineProperty(C.prototype, accessorName, {
|
2015-02-07 03:45:09 +01:00
|
|
|
get: function () { },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C.prototype, accessorName, {
|
2015-02-07 03:45:09 +01:00
|
|
|
set: function (v) { },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C, accessorName, {
|
2015-02-07 03:45:09 +01:00
|
|
|
get: function () { },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C, accessorName, {
|
2015-02-07 03:45:09 +01:00
|
|
|
set: function (v) { },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
return C;
|
|
|
|
})();
|