import { OCPPVersion } from '../types/ocpp/OCPPVersion';
import {
AvailabilityType,
- BootNotificationRequest,
- CachedRequest,
- ErrorCallback,
- HeartbeatRequest,
- IncomingRequest,
+ type BootNotificationRequest,
+ type CachedRequest,
+ type ErrorCallback,
+ type HeartbeatRequest,
+ type IncomingRequest,
IncomingRequestCommand,
- MeterValuesRequest,
+ type MeterValuesRequest,
RequestCommand,
- ResponseCallback,
- StatusNotificationRequest,
+ type ResponseCallback,
+ type StatusNotificationRequest,
} from '../types/ocpp/Requests';
import {
- BootNotificationResponse,
- ErrorResponse,
- HeartbeatResponse,
- MeterValuesResponse,
+ type BootNotificationResponse,
+ type ErrorResponse,
+ type HeartbeatResponse,
+ type MeterValuesResponse,
RegistrationStatus,
- Response,
- StatusNotificationResponse,
+ type Response,
+ type StatusNotificationResponse,
} from '../types/ocpp/Responses';
import {
StopTransactionReason,
- StopTransactionRequest,
- StopTransactionResponse,
+ type StopTransactionRequest,
+ type StopTransactionResponse,
} from '../types/ocpp/Transaction';
import { WSError, WebSocketCloseEventStatusCode } from '../types/WebSocket';
import Configuration from '../utils/Configuration';
import { ThreadWorker } from 'poolifier';
import type { ChargingStationWorkerData } from '../types/ChargingStationWorker';
-import { WorkerMessage, WorkerMessageEvents } from '../types/Worker';
+import { type WorkerMessage, WorkerMessageEvents } from '../types/Worker';
import Utils from '../utils/Utils';
import WorkerConstants from '../worker/WorkerConstants';
import ChargingStation from './ChargingStation';
import {
- ChargingStationData,
- ChargingStationWorkerMessage,
+ type ChargingStationData,
+ type ChargingStationWorkerMessage,
ChargingStationWorkerMessageEvents,
} from '../types/ChargingStationWorker';
import type { Statistics } from '../types/Statistics';
RequestCommand,
type RequestParams,
type ResponseCallback,
- ResponseType,
+ type ResponseType,
} from '../../types/ocpp/Requests';
import type { ErrorResponse, Response } from '../../types/ocpp/Responses';
import Constants from '../../utils/Constants';
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
- public abstract requestHandler<RequestType extends JsonType, ResponseType extends JsonType>(
+ public abstract requestHandler<ReqType extends JsonType, ResType extends JsonType>(
chargingStation: ChargingStation,
commandName: RequestCommand,
commandParams?: JsonType,
params?: RequestParams
- ): Promise<ResponseType>;
+ ): Promise<ResType>;
}
import type { UIServerConfiguration } from '../../types/ConfigurationData';
import {
AuthenticationType,
- ProcedureName,
- ProtocolRequest,
- ProtocolResponse,
- ProtocolVersion,
- RequestPayload,
- ResponsePayload,
+ type ProcedureName,
+ type ProtocolRequest,
+ type ProtocolResponse,
+ type ProtocolVersion,
+ type RequestPayload,
+ type ResponsePayload,
} from '../../types/UIProtocol';
import type AbstractUIService from './ui-services/AbstractUIService';
import UIServiceFactory from './ui-services/UIServiceFactory';
import BaseError from '../../exception/BaseError';
import type { UIServerConfiguration } from '../../types/ConfigurationData';
import {
- ProcedureName,
- Protocol,
- ProtocolRequest,
- ProtocolResponse,
- ProtocolVersion,
- RequestPayload,
+ type ProcedureName,
+ type Protocol,
+ type ProtocolRequest,
+ type ProtocolResponse,
+ type ProtocolVersion,
+ type RequestPayload,
ResponseStatus,
} from '../../types/UIProtocol';
import logger from '../../utils/Logger';
-import { Worker, isMainThread } from 'worker_threads';
+import { type Worker, isMainThread } from 'worker_threads';
import type { PoolOptions } from 'poolifier';
-import { WorkerData, WorkerOptions, WorkerProcessType } from '../types/Worker';
+import { type WorkerData, type WorkerOptions, WorkerProcessType } from '../types/Worker';
import type WorkerAbstract from './WorkerAbstract';
import WorkerConstants from './WorkerConstants';
import WorkerDynamicPool from './WorkerDynamicPool';