perf: reduce OCPPUtils memory usage
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 2.0 / Variables.ts
index 9de1dcc8a81bf1494061fedc4970863373229707..c08e00f0adb3b5f883acefeabc63f2a5ad27e54a 100644 (file)
@@ -1,4 +1,5 @@
-import type { EVSEType, JsonObject, StatusInfoType } from '../../internal';
+import type { EVSEType, StatusInfoType } from './Common';
+import type { JsonObject } from '../../JsonType';
 
 enum OCPP20ComponentName {
   AlignedDataCtrlr = 'AlignedDataCtrlr',
@@ -74,8 +75,14 @@ type ComponentType = {
   evse?: EVSEType;
 } & JsonObject;
 
+type VariableName =
+  | string
+  | OCPP20RequiredVariableName
+  | OCPP20OptionalVariableName
+  | OCPP20VendorVariableName;
+
 type VariableType = {
-  name: string | OCPP20RequiredVariableName | OCPP20OptionalVariableName | OCPP20VendorVariableName;
+  name: VariableName;
   instance?: string;
 } & JsonObject;
 
@@ -103,7 +110,7 @@ export type OCPP20SetVariableResultType = {
   attributeStatusInfo?: StatusInfoType;
 } & JsonObject;
 
-type OCPP20ComponentVariableType = {
+export type OCPP20ComponentVariableType = {
   component: ComponentType;
   variable?: VariableType;
 } & JsonObject;