X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FWorkerBroadcastChannel.ts;h=f3c168bdc8f1057611d1b8768d6d1dde0364c627;hb=728e01f09f2b43946aab50eb2ed9673bf2d2daa3;hp=aa696fcc036e0b864b5a3501c7d189143117875e;hpb=44eb6026079c8dc2c77b10a96a42d0c0b2da7c8f;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/WorkerBroadcastChannel.ts b/src/charging-station/WorkerBroadcastChannel.ts index aa696fcc..f3c168bd 100644 --- a/src/charging-station/WorkerBroadcastChannel.ts +++ b/src/charging-station/WorkerBroadcastChannel.ts @@ -1,17 +1,16 @@ -import { BroadcastChannel } from 'worker_threads'; +import { BroadcastChannel } from 'node:worker_threads'; -import type { JsonType } from '../types/JsonType'; import type { BroadcastChannelRequest, BroadcastChannelResponse, + JsonType, MessageEvent, -} from '../types/WorkerBroadcastChannel'; -import logger from '../utils/Logger'; -import Utils from '../utils/Utils'; +} from '../types'; +import { Utils, logger } from '../utils'; const moduleName = 'WorkerBroadcastChannel'; -export default abstract class WorkerBroadcastChannel extends BroadcastChannel { +export abstract class WorkerBroadcastChannel extends BroadcastChannel { protected constructor() { super('worker'); } @@ -54,7 +53,7 @@ export default abstract class WorkerBroadcastChannel extends BroadcastChannel { return messageEvent; } - private logPrefix(modName: string, methodName: string): string { + private logPrefix = (modName: string, methodName: string): string => { return Utils.logPrefix(` Worker Broadcast Channel | ${modName}.${methodName}:`); - } + }; }