From c7dcb2786a32df094a39ac9614ab6c723af74585 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 8 Oct 2023 23:42:20 -0400 Subject: [PATCH] fix: explicitly define subscribeToUpdates return type --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index e0a3740..8942589 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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;