X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=ui%2Fweb%2Fsrc%2Fcomposables%2FUIClient.ts;h=ccd16c215565855d99ec0fa400bb7da0f8dd89bc;hb=f568f36861d62d759a95b17fbe10380eca88a71b;hp=c2f1b0c21bff809e568ef386b612c3fba5812e02;hpb=4147bb7ee6c183f244a10431b4dc53d71917f611;p=e-mobility-charging-stations-simulator.git diff --git a/ui/web/src/composables/UIClient.ts b/ui/web/src/composables/UIClient.ts index c2f1b0c2..ccd16c21 100644 --- a/ui/web/src/composables/UIClient.ts +++ b/ui/web/src/composables/UIClient.ts @@ -1,4 +1,4 @@ -import Utils from './Utils'; +import { promiseWithTimeout } from './Utils'; import { ProcedureName, type ProtocolResponse, @@ -128,7 +128,7 @@ export default class UIClient { id: string, procedureName: ProcedureName, resolve: (value: ResponsePayload | PromiseLike) => void, - reject: (reason?: any) => void + reject: (reason?: unknown) => void ): void { this.responseHandlers.set(id, { procedureName, resolve, reject }); } @@ -146,7 +146,7 @@ export default class UIClient { data: RequestPayload ): Promise { let uuid: string; - return Utils.promiseWithTimeout( + return promiseWithTimeout( new Promise((resolve, reject) => { uuid = crypto.randomUUID(); const msg = JSON.stringify([uuid, command, data]);