30 lines
560 B
JavaScript
30 lines
560 B
JavaScript
//// [computedPropertyNames14_ES6.ts]
|
|
var b: boolean;
|
|
class C {
|
|
[b]() {}
|
|
static [true]() { }
|
|
[[]]() { }
|
|
static [{}]() { }
|
|
[undefined]() { }
|
|
static [null]() { }
|
|
}
|
|
|
|
//// [computedPropertyNames14_ES6.js]
|
|
var b;
|
|
var C = (function () {
|
|
function C() {
|
|
}
|
|
C.prototype[b] = function () {
|
|
};
|
|
C[true] = function () {
|
|
};
|
|
C.prototype[[]] = function () {
|
|
};
|
|
C[{}] = function () {
|
|
};
|
|
C.prototype[undefined] = function () {
|
|
};
|
|
C[null] = function () {
|
|
};
|
|
return C;
|
|
})();
|