make mutators enumerable
This commit is contained in:
parent
187f7ba01e
commit
4a439857d2
@ -117,6 +117,8 @@ exports.buildDefineProperties = function (mutatorMap) {
|
||||
|
||||
var propNode = t.property("init", map._key, mapNode, map._computed);
|
||||
|
||||
map.enumerable = t.literal(true);
|
||||
|
||||
_.each(map, function (node, key) {
|
||||
if (key[0] === "_") return;
|
||||
|
||||
|
||||
@ -8,7 +8,8 @@ var obj = (function (_obj) {
|
||||
},
|
||||
set: function (value) {
|
||||
this._foo = value;
|
||||
}
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -5,7 +5,8 @@ var obj = (function (_obj) {
|
||||
foo: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
}
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -5,7 +5,8 @@ var obj = (function (_obj) {
|
||||
foo: {
|
||||
set: function (value) {
|
||||
this._foo = value;
|
||||
}
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -15,7 +15,8 @@ var Test = (function () {
|
||||
},
|
||||
set: function (val) {
|
||||
this._test = val;
|
||||
}
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -12,7 +12,8 @@ var Test = (function () {
|
||||
test: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
}
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -12,7 +12,8 @@ var Test = (function () {
|
||||
test: {
|
||||
set: function (val) {
|
||||
this._test = val;
|
||||
}
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -13,7 +13,8 @@ var A = (function () {
|
||||
_classProps(A, {
|
||||
b: {
|
||||
get: function () {},
|
||||
set: function (b) {}
|
||||
set: function (b) {},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -14,7 +14,8 @@ var Foo = (function () {
|
||||
if (this._memoDone) return this._memo;
|
||||
this._memoDone = true;
|
||||
return this._memo = complex();
|
||||
}
|
||||
},
|
||||
enumerable: true
|
||||
};
|
||||
return _ref;
|
||||
})({
|
||||
@ -23,7 +24,8 @@ var Foo = (function () {
|
||||
if (this._barDone) return this._bar;
|
||||
this._barDone = true;
|
||||
return this._bar = complex();
|
||||
}
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
}));
|
||||
|
||||
@ -45,7 +47,8 @@ var foo = (function (_foo) {
|
||||
if (this._barDone) return this._bar;
|
||||
this._barDone = true;
|
||||
return this._bar = complex();
|
||||
}
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -12,7 +12,8 @@ var Test = (function () {
|
||||
bar: {
|
||||
get: function () {
|
||||
throw new Error("wow");
|
||||
}
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user