fix: explicitly define subscribeToUpdates return type

This commit is contained in:
Derrick Hammer 2023-10-08 23:42:20 -04:00
parent e3eb1b35f9
commit c7dcb2786a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import { Client, factory } from "@lumeweb/libkernel/module";
import type { DataFn } from "@lumeweb/libkernel";
const MODULE = "zdiVGkiECt8CT7psN5wsQyNHewyRJLjPhAGwYGTRXPyAPXP21bdupzHyaw";
@ -22,7 +23,7 @@ export class NetworkRegistryClient extends Client {
public async getNetworksByType(type: string) {
return this.callModuleReturn("getNetworksByType", { type });
}
public subscribeToUpdates(cb: () => void) {
public subscribeToUpdates(cb: () => void): DataFn {
const [stop] = this.connectModule("subscribeToUpdates", undefined, cb);
return stop;