Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
call(member, args) {
// The first access (the get) should do the memo assignment.
this.memoise(member, 1);
return optimiseCall(this.get(member), this.receiver(member), args);
},
};
// special case single arguments spread
bareSuperNode.arguments[1] = bareSuperNode.arguments[1].argument;
bareSuperNode.callee = t.memberExpression(
t.cloneNode(superRef),
t.identifier("apply"),
);
} else {
bareSuperNode.callee = t.memberExpression(
t.cloneNode(superRef),
t.identifier("call"),
);
}
call = t.logicalExpression("||", bareSuperNode, t.thisExpression());
} else {
bareSuperNode = optimiseCall(
t.callExpression(classState.file.addHelper("getPrototypeOf"), [
t.cloneNode(classState.classRef),
]),
t.thisExpression(),
bareSuperNode.arguments,
);
call = t.callExpression(
classState.file.addHelper("possibleConstructorReturn"),
[t.thisExpression(), bareSuperNode],
);
}
if (
bareSuper.parentPath.isExpressionStatement() &&
bareSuper.parentPath.container === body.node.body &&
call(superMember, args) {
return optimiseCall(this.get(superMember), t.thisExpression(), args);
},
};