From: Jérôme Benoit Date: Wed, 4 Jan 2023 15:16:03 +0000 (+0100) Subject: Use import type in more places X-Git-Tag: v1.1.89~35 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=27782dbc3512349e7ff5e9fab9180dd31bf68ffa;p=e-mobility-charging-stations-simulator.git Use import type in more places Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts index 754d0fbf..dc14d006 100644 --- a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts @@ -5,7 +5,7 @@ import path from 'path'; import { URL, fileURLToPath } from 'url'; import type { JSONSchemaType } from 'ajv'; -import { Client, FTPResponse } from 'basic-ftp'; +import { Client, type FTPResponse } from 'basic-ftp'; import tar from 'tar'; import OCPPError from '../../../exception/OCPPError'; @@ -14,7 +14,7 @@ import { OCPP16ChargePointErrorCode } from '../../../types/ocpp/1.6/ChargePointE import { OCPP16ChargePointStatus } from '../../../types/ocpp/1.6/ChargePointStatus'; import { ChargingProfilePurposeType, - OCPP16ChargingProfile, + type OCPP16ChargingProfile, } from '../../../types/ocpp/1.6/ChargingProfile'; import { OCPP16StandardParametersKey, @@ -22,53 +22,53 @@ import { } from '../../../types/ocpp/1.6/Configuration'; import { OCPP16DiagnosticsStatus } from '../../../types/ocpp/1.6/DiagnosticsStatus'; import { - ChangeAvailabilityRequest, - ChangeConfigurationRequest, - ClearChargingProfileRequest, - DiagnosticsStatusNotificationRequest, - GetConfigurationRequest, - GetDiagnosticsRequest, + type ChangeAvailabilityRequest, + type ChangeConfigurationRequest, + type ClearChargingProfileRequest, + type DiagnosticsStatusNotificationRequest, + type GetConfigurationRequest, + type GetDiagnosticsRequest, OCPP16AvailabilityType, - OCPP16BootNotificationRequest, - OCPP16ClearCacheRequest, - OCPP16DataTransferRequest, + type OCPP16BootNotificationRequest, + type OCPP16ClearCacheRequest, + type OCPP16DataTransferRequest, OCPP16DataTransferVendorId, - OCPP16HeartbeatRequest, + type OCPP16HeartbeatRequest, OCPP16IncomingRequestCommand, OCPP16MessageTrigger, OCPP16RequestCommand, - OCPP16StatusNotificationRequest, - OCPP16TriggerMessageRequest, - OCPP16UpdateFirmwareRequest, - RemoteStartTransactionRequest, - RemoteStopTransactionRequest, - ResetRequest, - SetChargingProfileRequest, - UnlockConnectorRequest, + type OCPP16StatusNotificationRequest, + type OCPP16TriggerMessageRequest, + type OCPP16UpdateFirmwareRequest, + type RemoteStartTransactionRequest, + type RemoteStopTransactionRequest, + type ResetRequest, + type SetChargingProfileRequest, + type UnlockConnectorRequest, } from '../../../types/ocpp/1.6/Requests'; import { - ChangeAvailabilityResponse, - ChangeConfigurationResponse, - ClearChargingProfileResponse, - DiagnosticsStatusNotificationResponse, - GetConfigurationResponse, - GetDiagnosticsResponse, - OCPP16BootNotificationResponse, - OCPP16DataTransferResponse, + type ChangeAvailabilityResponse, + type ChangeConfigurationResponse, + type ClearChargingProfileResponse, + type DiagnosticsStatusNotificationResponse, + type GetConfigurationResponse, + type GetDiagnosticsResponse, + type OCPP16BootNotificationResponse, + type OCPP16DataTransferResponse, OCPP16DataTransferStatus, - OCPP16HeartbeatResponse, - OCPP16StatusNotificationResponse, - OCPP16TriggerMessageResponse, - OCPP16UpdateFirmwareResponse, - SetChargingProfileResponse, - UnlockConnectorResponse, + type OCPP16HeartbeatResponse, + type OCPP16StatusNotificationResponse, + type OCPP16TriggerMessageResponse, + type OCPP16UpdateFirmwareResponse, + type SetChargingProfileResponse, + type UnlockConnectorResponse, } from '../../../types/ocpp/1.6/Responses'; import { OCPP16AuthorizationStatus, - OCPP16AuthorizeRequest, - OCPP16AuthorizeResponse, - OCPP16StartTransactionRequest, - OCPP16StartTransactionResponse, + type OCPP16AuthorizeRequest, + type OCPP16AuthorizeResponse, + type OCPP16StartTransactionRequest, + type OCPP16StartTransactionResponse, OCPP16StopTransactionReason, } from '../../../types/ocpp/1.6/Transaction'; import type { OCPPConfigurationKey } from '../../../types/ocpp/Configuration'; diff --git a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts index a4b1275f..ffbc15d7 100644 --- a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts @@ -10,12 +10,12 @@ import OCPPError from '../../../exception/OCPPError'; import type { JsonObject, JsonType } from '../../../types/JsonType'; import type { OCPP16MeterValuesRequest } from '../../../types/ocpp/1.6/MeterValues'; import { - DiagnosticsStatusNotificationRequest, - OCPP16BootNotificationRequest, - OCPP16DataTransferRequest, - OCPP16HeartbeatRequest, + type DiagnosticsStatusNotificationRequest, + type OCPP16BootNotificationRequest, + type OCPP16DataTransferRequest, + type OCPP16HeartbeatRequest, OCPP16RequestCommand, - OCPP16StatusNotificationRequest, + type OCPP16StatusNotificationRequest, } from '../../../types/ocpp/1.6/Requests'; import type { OCPP16AuthorizeRequest, diff --git a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts index 62c3a0d1..5cb69c7c 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts @@ -16,26 +16,26 @@ import type { OCPP16MeterValuesResponse, } from '../../../types/ocpp/1.6/MeterValues'; import { - OCPP16BootNotificationRequest, + type OCPP16BootNotificationRequest, OCPP16RequestCommand, - OCPP16StatusNotificationRequest, + type OCPP16StatusNotificationRequest, } from '../../../types/ocpp/1.6/Requests'; import { - DiagnosticsStatusNotificationResponse, - OCPP16BootNotificationResponse, - OCPP16DataTransferResponse, - OCPP16HeartbeatResponse, + type DiagnosticsStatusNotificationResponse, + type OCPP16BootNotificationResponse, + type OCPP16DataTransferResponse, + type OCPP16HeartbeatResponse, OCPP16RegistrationStatus, - OCPP16StatusNotificationResponse, + type OCPP16StatusNotificationResponse, } from '../../../types/ocpp/1.6/Responses'; import { OCPP16AuthorizationStatus, - OCPP16AuthorizeRequest, - OCPP16AuthorizeResponse, - OCPP16StartTransactionRequest, - OCPP16StartTransactionResponse, - OCPP16StopTransactionRequest, - OCPP16StopTransactionResponse, + type OCPP16AuthorizeRequest, + type OCPP16AuthorizeResponse, + type OCPP16StartTransactionRequest, + type OCPP16StartTransactionResponse, + type OCPP16StopTransactionRequest, + type OCPP16StopTransactionResponse, } from '../../../types/ocpp/1.6/Transaction'; import { ErrorType } from '../../../types/ocpp/ErrorType'; import type { ResponseHandler } from '../../../types/ocpp/Responses'; diff --git a/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts b/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts index 040850a3..bb129482 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts @@ -16,10 +16,10 @@ import { MeterValueContext, MeterValueLocation, MeterValueUnit, - OCPP16MeterValue, + type OCPP16MeterValue, OCPP16MeterValueMeasurand, OCPP16MeterValuePhase, - OCPP16SampledValue, + type OCPP16SampledValue, } from '../../../types/ocpp/1.6/MeterValues'; import { OCPP16IncomingRequestCommand, diff --git a/src/charging-station/ocpp/OCPPRequestService.ts b/src/charging-station/ocpp/OCPPRequestService.ts index da39fb9e..839e3995 100644 --- a/src/charging-station/ocpp/OCPPRequestService.ts +++ b/src/charging-station/ocpp/OCPPRequestService.ts @@ -10,12 +10,12 @@ import type { JsonObject, JsonType } from '../../types/JsonType'; import { ErrorType } from '../../types/ocpp/ErrorType'; import { MessageType } from '../../types/ocpp/MessageType'; import { - ErrorCallback, - IncomingRequestCommand, - OutgoingRequest, + type ErrorCallback, + type IncomingRequestCommand, + type OutgoingRequest, RequestCommand, - RequestParams, - ResponseCallback, + type RequestParams, + type ResponseCallback, ResponseType, } from '../../types/ocpp/Requests'; import type { ErrorResponse, Response } from '../../types/ocpp/Responses';