fix: return type required
This commit is contained in:
parent
50335dd062
commit
7eabf6a05d
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue