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

55 lines
1.3 KiB
JavaScript

//// [computedPropertyNames17.ts]
var b: boolean;
class C {
get [b]() { return 0;}
static set [true](v) { }
get [[]]() { return 0; }
set [{}](v) { }
static get [undefined]() { return 0; }
set [null](v) { }
}
//// [computedPropertyNames17.js]
var b;
var C = (function () {
function C() {
}
Object.defineProperty(C.prototype, b, {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C, true, {
set: function (v) { },
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, [], {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, {}, {
set: function (v) { },
enumerable: true,
configurable: true
});
Object.defineProperty(C, undefined, {
get: function () {
return 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(C.prototype, null, {
set: function (v) { },
enumerable: true,
configurable: true
});
return C;
})();