fix: return type required

This commit is contained in:
Derrick Hammer 2023-07-22 06:11:18 -04:00
parent 50335dd062
commit 7eabf6a05d
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import b4a from "b4a";
import Backoff from "backoff.js"; import Backoff from "backoff.js";
// @ts-ignore // @ts-ignore
import Protomux from "protomux"; import Protomux from "protomux";
import { UnsubscribeFn } from "emittery";
export class SwarmClient extends Client { export class SwarmClient extends Client {
private useDefaultSwarm: boolean; private useDefaultSwarm: boolean;
@ -188,7 +189,7 @@ export class Socket extends Client {
await this.swarm.emit("setup", this); await this.swarm.emit("setup", this);
} }
on(event: any, listener: any) { on(event: any, listener: any): UnsubscribeFn {
const parentOn = super.on(event, listener); const parentOn = super.on(event, listener);
if (this.eventUpdates[event]?.has(listener)) { if (this.eventUpdates[event]?.has(listener)) {
return parentOn; return parentOn;