)
: undefined
if (connectorStatus != null) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- connectorStatus.startDate = convertToDate(connectorStatus.startDate)!
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- connectorStatus.lastRunDate = convertToDate(connectorStatus.lastRunDate)!
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- connectorStatus.stopDate = convertToDate(connectorStatus.stopDate)!
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- connectorStatus.stoppedDate = convertToDate(connectorStatus.stoppedDate)!
+ connectorStatus.startDate = convertToDate(connectorStatus.startDate)
+ connectorStatus.lastRunDate = convertToDate(connectorStatus.lastRunDate)
+ connectorStatus.stopDate = convertToDate(connectorStatus.stopDate)
+ connectorStatus.stoppedDate = convertToDate(connectorStatus.stoppedDate)
if (
!this.started &&
(connectorStatus.start ||
chargingProfile.chargingProfileId
} startSchedule property is not a Date instance. Trying to convert it to a Date instance`
)
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
chargingProfile.chargingSchedule.startSchedule = convertToDate(
chargingProfile.chargingSchedule.startSchedule
- )!
+ )
}
if (chargingProfile.chargingSchedule.duration == null) {
logger.debug(
// OCPP specifies that if duration is not defined, it should be infinite
chargingProfile.chargingSchedule.duration = differenceInSeconds(
maxTime,
- chargingProfile.chargingSchedule.startSchedule
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ chargingProfile.chargingSchedule.startSchedule!
)
}
if (
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
chargingStation.getConnectorStatus(connectorId)!.chargingProfiles = []
}
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- cp.chargingSchedule.startSchedule = convertToDate(cp.chargingSchedule.startSchedule)!
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- cp.validFrom = convertToDate(cp.validFrom)!
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- cp.validTo = convertToDate(cp.validTo)!
+ cp.chargingSchedule.startSchedule = convertToDate(cp.chargingSchedule.startSchedule)
+ cp.validFrom = convertToDate(cp.validFrom)
+ cp.validTo = convertToDate(cp.validTo)
let cpReplaced = false
if (isNotEmptyArray(chargingStation.getConnectorStatus(connectorId)?.chargingProfiles)) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion