X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Focpp%2FOCPPRequestService.ts;h=a3eca0700ac40126ca601d3471ba11a4c9c26a8d;hb=99100f9c8709a7ead56c1e2745db80a75e8f6f79;hp=781a2b8c88f97f15b884144c5b22732cdcc285d8;hpb=4c3f6c20f9416e148a3d26b6a06acc13274ab469;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/OCPPRequestService.ts b/src/charging-station/ocpp/OCPPRequestService.ts index 781a2b8c..a3eca070 100644 --- a/src/charging-station/ocpp/OCPPRequestService.ts +++ b/src/charging-station/ocpp/OCPPRequestService.ts @@ -245,7 +245,7 @@ export abstract class OCPPRequestService { // eslint-disable-next-line @typescript-eslint/no-this-alias const self = this // Send a message through wsConnection - return await new Promise((resolve, reject) => { + return await new Promise((resolve, reject: (reason?: unknown) => void) => { /** * Function that will receive the request's response * @@ -383,7 +383,11 @@ export abstract class OCPPRequestService { params.skipBufferingOnError === false ? '' : 'non ' }buffered message id '${messageId}' with content '${messageToSend}'`, commandName, - { name: error.name, message: error.message, stack: error.stack } + { + name: error.name, + message: error.message, + stack: error.stack + } ) ) } @@ -477,12 +481,10 @@ export abstract class OCPPRequestService { ]) } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public abstract requestHandler( chargingStation: ChargingStation, commandName: RequestCommand, - // FIXME: should be ReqType - commandParams?: JsonType, + commandParams?: ReqType, params?: RequestParams ): Promise }