58 lines
1.3 KiB
JavaScript
58 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;
|
||
|
})();
|