Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ref,
path,
privateNamesMap,
loose,
state,
) {
const body = path.get("body");
if (loose) {
body.traverse(privateNameVisitor, {
privateNamesMap,
file: state,
...privateNameHandlerLoose,
});
} else {
memberExpressionToFunctions(body, privateNameVisitor, {
privateNamesMap,
classRef: ref,
file: state,
...privateNameHandlerSpec,
});
}
}
replace() {
const handler = this.isLoose ? looseHandlers : specHandlers;
memberExpressionToFunctions(this.methodPath, visitor, {
file: this.file,
isStatic: this.isStatic,
isPrivateMethod: this.isPrivateMethod,
getObjectRef: this.getObjectRef.bind(this),
superRef: this.superRef,
...handler,
});
}
}