From: Jérôme Benoit Date: Sun, 19 Sep 2021 19:41:14 +0000 (+0200) Subject: Add empty object type and use it on some ocpp responses type X-Git-Tag: v1.1.5~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=c12b43d0f4569a189e064768c14088ab8fce9e1b;p=e-mobility-charging-stations-simulator.git Add empty object type and use it on some ocpp responses type Signed-off-by: Jérôme Benoit --- diff --git a/src/types/ocpp/1.6/MeterValues.ts b/src/types/ocpp/1.6/MeterValues.ts index ec200b19..d3038e63 100644 --- a/src/types/ocpp/1.6/MeterValues.ts +++ b/src/types/ocpp/1.6/MeterValues.ts @@ -1,3 +1,5 @@ +import { EmptyObject } from '../../EmptyObject'; + export enum MeterValueUnit { WATT_HOUR = 'Wh', KILO_WATT_HOUR = 'kWh', @@ -100,6 +102,5 @@ export interface MeterValuesRequest { meterValue: OCPP16MeterValue[]; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface MeterValuesResponse {} +export type MeterValuesResponse = EmptyObject; diff --git a/src/types/ocpp/1.6/Requests.ts b/src/types/ocpp/1.6/Requests.ts index 860f4b06..d83417b0 100644 --- a/src/types/ocpp/1.6/Requests.ts +++ b/src/types/ocpp/1.6/Requests.ts @@ -1,5 +1,6 @@ import { ChargingProfilePurposeType, OCPP16ChargingProfile } from './ChargingProfile'; +import { EmptyObject } from '../../EmptyObject'; import { OCPP16ChargePointErrorCode } from './ChargePointErrorCode'; import { OCPP16ChargePointStatus } from './ChargePointStatus'; import { OCPP16DiagnosticsStatus } from './DiagnosticsStatus'; @@ -32,8 +33,7 @@ export enum OCPP16IncomingRequestCommand { TRIGGER_MESSAGE = 'TriggerMessage' } -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface HeartbeatRequest { } +export type HeartbeatRequest = EmptyObject; export interface OCPP16BootNotificationRequest { chargeBoxSerialNumber?: string; diff --git a/src/types/ocpp/1.6/Responses.ts b/src/types/ocpp/1.6/Responses.ts index cf0a84ef..4f526b94 100644 --- a/src/types/ocpp/1.6/Responses.ts +++ b/src/types/ocpp/1.6/Responses.ts @@ -1,3 +1,4 @@ +import { EmptyObject } from '../../EmptyObject'; import { OCPPConfigurationKey } from '../Configuration'; export interface HeartbeatResponse { @@ -37,8 +38,7 @@ export interface OCPP16BootNotificationResponse { interval: number; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface StatusNotificationResponse {} +export type StatusNotificationResponse = EmptyObject; export interface GetConfigurationResponse { configurationKey: OCPPConfigurationKey[]; @@ -78,8 +78,7 @@ export interface GetDiagnosticsResponse { fileName?: string; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface DiagnosticsStatusNotificationResponse {} +export type DiagnosticsStatusNotificationResponse = EmptyObject; export enum OCPP16TriggerMessageStatus { ACCEPTED = 'Accepted',