if (Configuration.workerPoolInUse()) {
chargingStationWorker = new ThreadWorker<ChargingStationWorkerData>(
(data?: ChargingStationWorkerData): void => {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- new ChargingStation(data!.index, data!.templateFile).add()
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, no-new
+ new ChargingStation(data!.index, data!.templateFile, data!.options)
}
)
} else {
try {
const chargingStation = new ChargingStation(
message.data.index,
- message.data.templateFile
+ message.data.templateFile,
+ message.data.options
)
- chargingStation.add()
parentPort?.postMessage({
event: WorkerMessageEvents.addedWorkerElement,
data: buildChargingStationDataPayload(chargingStation)