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