From: Jérôme Benoit Date: Wed, 20 Aug 2025 11:29:08 +0000 (+0200) Subject: refactor: cleanup eslint-disable X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=0a11683a2a0d22a794fc9b64d22b6c471202fa6b;p=e-mobility-charging-stations-simulator.git refactor: cleanup eslint-disable Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/WorkerSet.ts b/src/worker/WorkerSet.ts index b0f29e64..e777fe65 100644 --- a/src/worker/WorkerSet.ts +++ b/src/worker/WorkerSet.ts @@ -118,10 +118,9 @@ export class WorkerSet extends Worke public async start (): Promise { this.addWorkerSetElement() // Add worker set element sequentially to optimize memory at startup - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - this.workerOptions.workerStartDelay! > 0 && - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - (await sleep(randomizeDelay(this.workerOptions.workerStartDelay!))) + if (this.workerOptions.workerStartDelay != null && this.workerOptions.workerStartDelay > 0) { + await sleep(randomizeDelay(this.workerOptions.workerStartDelay)) + } this.started = true this.emitter?.emit(WorkerSetEvents.started, this.info) }