Skip to content

Commit 209f1c9

Browse files
committed
minor code style changes
1 parent a361472 commit 209f1c9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/db/src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ export default class SwarmDB extends API {
2626

2727
async execute<T>(
2828
request: Request,
29-
cbk?: (Response<T>) => void,
29+
callback?: (Response<T>) => void,
3030
): Promise<{ ok: boolean, off?: () => boolean }> {
31-
const h = GQLSub.hash(request, cbk);
31+
const h = GQLSub.hash(request, callback);
3232
for (const s of this.subs) {
3333
if (s.is(h)) {
3434
return { ok: false };
@@ -42,7 +42,7 @@ export default class SwarmDB extends API {
4242
}
4343

4444
await this.ensure();
45-
const sub = new GQLSub(this, this.client, this.cache, request, cbk);
45+
const sub = new GQLSub(this, this.client, this.cache, request, callback);
4646
this.subs.push(sub);
4747
sub.finalize((h: string) => {
4848
let c = -1;

packages/db/src/subscription.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ export class GQLSub {
336336
}
337337
}
338338

339-
static hash(request: Request, cbk?: (Response<any>) => void): string {
339+
static hash(request: Request, cbk?: (Response<*>) => void): string {
340340
return hash({ request, cbk });
341341
}
342342
}

0 commit comments

Comments
 (0)