refactor: cleanup worker related type definitions
[e-mobility-charging-stations-simulator.git] / src / types / ChargingStationWorker.ts
index 336b50e87c76da63a95425fca72711805a8b24ce..4d47a5e3698bb96a5bad1e9f3093af396993be32 100644 (file)
@@ -1,6 +1,6 @@
 import type { WebSocket } from 'ws'
 
-import { type WorkerData, type WorkerMessage } from '../worker/index.js'
+import type { WorkerData } from '../worker/index.js'
 import type { ChargingStationAutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator.js'
 import { ChargingStationEvents } from './ChargingStationEvents.js'
 import type { ChargingStationInfo } from './ChargingStationInfo.js'
@@ -62,9 +62,7 @@ export type ChargingStationWorkerMessageEvents =
 
 export type ChargingStationWorkerMessageData = ChargingStationData | Statistics
 
-export type ChargingStationWorkerMessage<T extends ChargingStationWorkerMessageData> = Omit<
-WorkerMessage<T>,
-'uuid' | 'event'
-> & {
+export interface ChargingStationWorkerMessage<T extends ChargingStationWorkerMessageData> {
   event: ChargingStationWorkerMessageEvents
+  data: T
 }