RegistrationStatusEnumType,
RequestCommand,
type Response,
- type ResponseCallback,
StandardParametersKey,
type StatusNotificationRequest,
type StatusNotificationResponse,
}
public openWSConnection(
- options: WsOptions = this.stationInfo?.wsOptions ?? Constants.EMPTY_OBJECT,
+ options: WsOptions = this.stationInfo?.wsOptions ?? {},
params: { closeOpened?: boolean; terminateOpened?: boolean } = {
closeOpened: false,
terminateOpened: false,
},
reset: true,
},
- stationTemplate?.firmwareUpgrade ?? Constants.EMPTY_OBJECT
+ stationTemplate?.firmwareUpgrade ?? {}
);
stationInfo.resetTime = !Utils.isNullOrUndefined(stationTemplate?.resetTime)
? stationTemplate.resetTime * 1000
fs.mkdirSync(path.dirname(this.configurationFile), { recursive: true });
}
const configurationData: ChargingStationConfiguration =
- Utils.cloneObject(this.getConfigurationFromFile()) ?? Constants.EMPTY_OBJECT;
+ Utils.cloneObject(this.getConfigurationFromFile()) ?? {};
this.ocppConfiguration?.configurationKey &&
(configurationData.configurationKey = this.ocppConfiguration.configurationKey);
this.stationInfo && (configurationData.stationInfo = this.stationInfo);
);
this.openWSConnection(
{
- ...(this.stationInfo?.wsOptions ?? Constants.EMPTY_OBJECT),
+ ...(this.stationInfo?.wsOptions ?? {}),
handshakeTimeout: reconnectTimeout,
},
{ closeOpened: true }