From a72651e9246d6d0a8a9670f9ada534e5da5116e6 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 27 Jul 2023 10:17:35 -0400 Subject: [PATCH] fix: make getNetworkModuleStatus not be async so we don't need to wait to get the async function if we have a callback --- src/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api.ts b/src/api.ts index cf5ba5a..4b0c24b 100644 --- a/src/api.ts +++ b/src/api.ts @@ -23,12 +23,12 @@ export const connectModule = kernelEnv export const log = kernelEnv ? logKernel : logModule; export const logErr = kernelEnv ? logErrKernel : logErrModule; -export async function getNetworkModuleStatus( +export function getNetworkModuleStatus( callback?: any, module?: string, // @ts-ignore CM: connectModuleBound = connectModule.bind(null, module), -): Promise Promise)> { +): Promise | (() => Promise) { let recvUpdate = (data) => { callback?.(data); };