make mutators enumerable

This commit is contained in:
Sebastian McKenzie 2014-12-10 21:11:13 +11:00
parent 187f7ba01e
commit 4a439857d2
10 changed files with 24 additions and 11 deletions

View File

@ -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;

View File

@ -8,7 +8,8 @@ var obj = (function (_obj) {
},
set: function (value) {
this._foo = value;
}
},
enumerable: true
}
});

View File

@ -5,7 +5,8 @@ var obj = (function (_obj) {
foo: {
get: function () {
return 5 + 5;
}
},
enumerable: true
}
});

View File

@ -5,7 +5,8 @@ var obj = (function (_obj) {
foo: {
set: function (value) {
this._foo = value;
}
},
enumerable: true
}
});

View File

@ -15,7 +15,8 @@ var Test = (function () {
},
set: function (val) {
this._test = val;
}
},
enumerable: true
}
});

View File

@ -12,7 +12,8 @@ var Test = (function () {
test: {
get: function () {
return 5 + 5;
}
},
enumerable: true
}
});

View File

@ -12,7 +12,8 @@ var Test = (function () {
test: {
set: function (val) {
this._test = val;
}
},
enumerable: true
}
});

View File

@ -13,7 +13,8 @@ var A = (function () {
_classProps(A, {
b: {
get: function () {},
set: function (b) {}
set: function (b) {},
enumerable: true
}
});

View File

@ -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
}
});

View File

@ -12,7 +12,8 @@ var Test = (function () {
bar: {
get: function () {
throw new Error("wow");
}
},
enumerable: true
}
});