Skip to content

Commit 261fc3b

Browse files
Fix linter
Signed-off-by: Xavier Geerinck <[email protected]>
1 parent 1d2b90e commit 261fc3b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/actors/client/ActorProxyBuilder.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,21 @@ export default class ActorProxyBuilder<T> {
1515
}
1616

1717
build(actorId: ActorId): T {
18-
const self = this;
18+
const actorTypeClassName = this.actorTypeClass.name;
19+
const actorClient = this.actorClient;
1920

20-
let handler = {
21+
const handler = {
2122
get(target: any, propKey: any, receiver: any) {
2223
return async function (...args: any) {
23-
// console.log(`Invoking Actor "${self.actorTypeClass.name}" method "${propKey}"" with ${JSON.stringify(args)}`)
24-
2524
const method: "GET" | "PUT" = args.length > 0 ? "PUT" : "GET";
2625
const body = args.length > 0 ? args : null;
27-
const res = await self.actorClient.actor.invoke(method, self.actorTypeClass.name, actorId.getId(), propKey, body);
26+
const res = await actorClient.actor.invoke(method, actorTypeClassName, actorId.getId(), propKey, body);
2827

2928
return res;
3029
};
3130
}
3231
};
3332

34-
3533
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy
3634
// we implement a handler that will take a method and forward it to the actor client
3735
const proxy = new Proxy(this.actorTypeClass, handler);

0 commit comments

Comments
 (0)