Introduce objectWithoutPropertiesLoose helper (#8261)

This commit is contained in:
Mateusz Burzyński
2018-07-06 21:03:44 +02:00
committed by Henry Zhu
parent cea562c009
commit c0c13ae30f
11 changed files with 81 additions and 13 deletions

View File

@@ -188,10 +188,10 @@ export default declare((api, options) => {
} else {
keys = t.arrayExpression(keys);
value = t.callExpression(this.addHelper("objectWithoutProperties"), [
t.cloneNode(objRef),
keys,
]);
value = t.callExpression(
this.addHelper(`objectWithoutProperties${loose ? "Loose" : ""}`),
[t.cloneNode(objRef), keys],
);
}
this.nodes.push(this.buildVariableAssignment(spreadProp.argument, value));