Convert some type definitions to type syntax
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 10 Jan 2023 23:19:38 +0000 (00:19 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 10 Jan 2023 23:19:38 +0000 (00:19 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/types/Statistics.ts
src/types/ocpp/2.0/Requests.ts
src/types/ocpp/Configuration.ts

index f5a13ebbb143e87c7c201ebd20f971387dc78f5c..fb9ededbfa99a5c63d2cc99dad3af0bfa59c2f71 100644 (file)
@@ -23,11 +23,11 @@ export type StatisticsData = {
   stdDevTimeMeasurement: number;
 };
 
-export type Statistics = WorkerData & {
+export type Statistics = {
   id: string;
   name: string;
   uri: string;
   createdAt: Date;
   updatedAt?: Date;
   statisticsData: Map<string | RequestCommand | IncomingRequestCommand, Partial<StatisticsData>>;
-};
+} & WorkerData;
index 1b30a976a7ee21f3b0d27876e5269ee0475e4d2a..407fdfe4482bb1e9cb5b157bfe1e6b3523af0a60 100644 (file)
@@ -60,4 +60,4 @@ export type OCPP20StatusNotificationRequest = {
   connectorStatus: OCPP20ConnectorStatusEnumType;
   evseId: number;
   connectorId: number;
-};
+} & JsonObject;
index aa50c75222623680885bb8e0b85950150dae0181..6289a77deba09994d641b6de83e61ba234c4ac04 100644 (file)
@@ -31,8 +31,8 @@ export enum ConnectorPhaseRotation {
   TSR = 'TSR',
 }
 
-export interface OCPPConfigurationKey extends JsonObject {
+export type OCPPConfigurationKey = {
   key: string | StandardParametersKey;
   readonly: boolean;
   value?: string;
-}
+} & JsonObject;