await this.chargingStation.ocppRequestService.requestHandler<
StatusNotificationRequest,
StatusNotificationResponse
- >(this.chargingStation, RequestCommand.STATUS_NOTIFICATION, requestPayload, requestParams)
+ >(
+ this.chargingStation,
+ RequestCommand.STATUS_NOTIFICATION,
+ requestPayload,
+ requestParams
+ )
],
[
BroadcastChannelProcedureName.HEARTBEAT,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.chargingStation.getConnectorStatus(requestPayload!.connectorId!)!
.transactionId!,
- configuredMeterValueSampleInterval !== undefined
+ configuredMeterValueSampleInterval != null
? secondsToMilliseconds(convertToInt(configuredMeterValueSampleInterval.value))
: Constants.DEFAULT_METER_VALUES_INTERVAL
)
return
}
let responsePayload: BroadcastChannelResponsePayload | undefined
- let commandResponse: CommandResponse | undefined
+ // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
+ let commandResponse: CommandResponse | void | undefined
try {
commandResponse = await this.commandHandler(command, requestPayload)
- if (isNullOrUndefined(commandResponse) || isEmptyObject(commandResponse)) {
+ if (isNullOrUndefined(commandResponse) || isEmptyObject(commandResponse as CommandResponse)) {
responsePayload = {
hashId: this.chargingStation.stationInfo.hashId,
status: ResponseStatus.SUCCESS
responsePayload = this.commandResponseToResponsePayload(
command,
requestPayload,
- commandResponse
+ commandResponse as CommandResponse
)
}
} catch (error) {