build(ci): silence linter
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 1 Jul 2024 19:37:09 +0000 (21:37 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 1 Jul 2024 19:37:09 +0000 (21:37 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/1.6/OCPP16Constants.ts
src/charging-station/ocpp/2.0/OCPP20Constants.ts

index 214c5a85bf9797377d49d64813aa04d4116a319c..229124e0ee0480372482f317004475c00e0e6ebc 100644 (file)
@@ -2,9 +2,8 @@ import { type ConnectorStatusTransition, OCPP16ChargePointStatus } from '../../.
 import { OCPPConstants } from '../OCPPConstants.js'
 
 export class OCPP16Constants extends OCPPConstants {
-  static readonly ChargePointStatusChargingStationTransitions: Readonly<
-  ConnectorStatusTransition[]
-  > = Object.freeze([
+  static readonly ChargePointStatusChargingStationTransitions: readonly ConnectorStatusTransition[] =
+    Object.freeze([
       { to: OCPP16ChargePointStatus.Available },
       // { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Available },
       {
@@ -34,10 +33,10 @@ export class OCPP16Constants extends OCPPConstants {
         from: OCPP16ChargePointStatus.Faulted,
         to: OCPP16ChargePointStatus.Unavailable
       }
-    // { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Faulted }
+      // { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Faulted }
     ])
 
-  static readonly ChargePointStatusConnectorTransitions: Readonly<ConnectorStatusTransition[]> =
+  static readonly ChargePointStatusConnectorTransitions: readonly ConnectorStatusTransition[] =
     Object.freeze([
       { to: OCPP16ChargePointStatus.Available },
       // { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Available },
index b4c73bc28963e7f998c625ce40a9257c16d274fb..9e3c52a0e3a1f590f9476063d81f0135d18461ef 100644 (file)
@@ -5,7 +5,7 @@ import {
 import { OCPPConstants } from '../OCPPConstants.js'
 
 export class OCPP20Constants extends OCPPConstants {
-  static readonly ChargingStationStatusTransitions: Readonly<ConnectorStatusTransition[]> =
+  static readonly ChargingStationStatusTransitions: readonly ConnectorStatusTransition[] =
     Object.freeze([
       { to: OCPP20ConnectorStatusEnumType.Available },
       // { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Available },
@@ -42,92 +42,90 @@ export class OCPP20Constants extends OCPPConstants {
       // { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Faulted }
     ])
 
-  static readonly ConnectorStatusTransitions: Readonly<ConnectorStatusTransition[]> = Object.freeze(
-    [
-      { to: OCPP20ConnectorStatusEnumType.Available },
-      // { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Available },
-      {
-        from: OCPP20ConnectorStatusEnumType.Available,
-        to: OCPP20ConnectorStatusEnumType.Occupied
-      },
-      {
-        from: OCPP20ConnectorStatusEnumType.Available,
-        to: OCPP20ConnectorStatusEnumType.Reserved
-      },
-      {
-        from: OCPP20ConnectorStatusEnumType.Available,
-        to: OCPP20ConnectorStatusEnumType.Unavailable
-      },
-      {
-        from: OCPP20ConnectorStatusEnumType.Available,
-        to: OCPP20ConnectorStatusEnumType.Faulted
-      },
-      // { to: OCPP20ConnectorStatusEnumType.Occupied },
-      {
-        from: OCPP20ConnectorStatusEnumType.Occupied,
-        to: OCPP20ConnectorStatusEnumType.Available
-      },
-      // { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Occupied },
-      // { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Reserved },
-      {
-        from: OCPP20ConnectorStatusEnumType.Occupied,
-        to: OCPP20ConnectorStatusEnumType.Unavailable
-      },
-      {
-        from: OCPP20ConnectorStatusEnumType.Occupied,
-        to: OCPP20ConnectorStatusEnumType.Faulted
-      },
-      // { to: OCPP20ConnectorStatusEnumType.Reserved },
-      {
-        from: OCPP20ConnectorStatusEnumType.Reserved,
-        to: OCPP20ConnectorStatusEnumType.Available
-      },
-      {
-        from: OCPP20ConnectorStatusEnumType.Reserved,
-        to: OCPP20ConnectorStatusEnumType.Occupied
-      },
-      // { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Reserved },
-      {
-        from: OCPP20ConnectorStatusEnumType.Reserved,
-        to: OCPP20ConnectorStatusEnumType.Unavailable
-      },
-      {
-        from: OCPP20ConnectorStatusEnumType.Reserved,
-        to: OCPP20ConnectorStatusEnumType.Faulted
-      },
-      { to: OCPP20ConnectorStatusEnumType.Unavailable },
-      {
-        from: OCPP20ConnectorStatusEnumType.Unavailable,
-        to: OCPP20ConnectorStatusEnumType.Available
-      },
-      {
-        from: OCPP20ConnectorStatusEnumType.Unavailable,
-        to: OCPP20ConnectorStatusEnumType.Occupied
-      },
-      // { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Reserved },
-      // { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Unavailable },
-      {
-        from: OCPP20ConnectorStatusEnumType.Unavailable,
-        to: OCPP20ConnectorStatusEnumType.Faulted
-      },
-      { to: OCPP20ConnectorStatusEnumType.Faulted },
-      {
-        from: OCPP20ConnectorStatusEnumType.Faulted,
-        to: OCPP20ConnectorStatusEnumType.Available
-      },
-      {
-        from: OCPP20ConnectorStatusEnumType.Faulted,
-        to: OCPP20ConnectorStatusEnumType.Occupied
-      },
-      {
-        from: OCPP20ConnectorStatusEnumType.Faulted,
-        to: OCPP20ConnectorStatusEnumType.Reserved
-      },
-      {
-        from: OCPP20ConnectorStatusEnumType.Faulted,
-        to: OCPP20ConnectorStatusEnumType.Unavailable
-      }
-      // { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Faulted }
-    ]
-  )
+  static readonly ConnectorStatusTransitions: readonly ConnectorStatusTransition[] = Object.freeze([
+    { to: OCPP20ConnectorStatusEnumType.Available },
+    // { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Available },
+    {
+      from: OCPP20ConnectorStatusEnumType.Available,
+      to: OCPP20ConnectorStatusEnumType.Occupied
+    },
+    {
+      from: OCPP20ConnectorStatusEnumType.Available,
+      to: OCPP20ConnectorStatusEnumType.Reserved
+    },
+    {
+      from: OCPP20ConnectorStatusEnumType.Available,
+      to: OCPP20ConnectorStatusEnumType.Unavailable
+    },
+    {
+      from: OCPP20ConnectorStatusEnumType.Available,
+      to: OCPP20ConnectorStatusEnumType.Faulted
+    },
+    // { to: OCPP20ConnectorStatusEnumType.Occupied },
+    {
+      from: OCPP20ConnectorStatusEnumType.Occupied,
+      to: OCPP20ConnectorStatusEnumType.Available
+    },
+    // { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Occupied },
+    // { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Reserved },
+    {
+      from: OCPP20ConnectorStatusEnumType.Occupied,
+      to: OCPP20ConnectorStatusEnumType.Unavailable
+    },
+    {
+      from: OCPP20ConnectorStatusEnumType.Occupied,
+      to: OCPP20ConnectorStatusEnumType.Faulted
+    },
+    // { to: OCPP20ConnectorStatusEnumType.Reserved },
+    {
+      from: OCPP20ConnectorStatusEnumType.Reserved,
+      to: OCPP20ConnectorStatusEnumType.Available
+    },
+    {
+      from: OCPP20ConnectorStatusEnumType.Reserved,
+      to: OCPP20ConnectorStatusEnumType.Occupied
+    },
+    // { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Reserved },
+    {
+      from: OCPP20ConnectorStatusEnumType.Reserved,
+      to: OCPP20ConnectorStatusEnumType.Unavailable
+    },
+    {
+      from: OCPP20ConnectorStatusEnumType.Reserved,
+      to: OCPP20ConnectorStatusEnumType.Faulted
+    },
+    { to: OCPP20ConnectorStatusEnumType.Unavailable },
+    {
+      from: OCPP20ConnectorStatusEnumType.Unavailable,
+      to: OCPP20ConnectorStatusEnumType.Available
+    },
+    {
+      from: OCPP20ConnectorStatusEnumType.Unavailable,
+      to: OCPP20ConnectorStatusEnumType.Occupied
+    },
+    // { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Reserved },
+    // { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Unavailable },
+    {
+      from: OCPP20ConnectorStatusEnumType.Unavailable,
+      to: OCPP20ConnectorStatusEnumType.Faulted
+    },
+    { to: OCPP20ConnectorStatusEnumType.Faulted },
+    {
+      from: OCPP20ConnectorStatusEnumType.Faulted,
+      to: OCPP20ConnectorStatusEnumType.Available
+    },
+    {
+      from: OCPP20ConnectorStatusEnumType.Faulted,
+      to: OCPP20ConnectorStatusEnumType.Occupied
+    },
+    {
+      from: OCPP20ConnectorStatusEnumType.Faulted,
+      to: OCPP20ConnectorStatusEnumType.Reserved
+    },
+    {
+      from: OCPP20ConnectorStatusEnumType.Faulted,
+      to: OCPP20ConnectorStatusEnumType.Unavailable
+    }
+    // { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Faulted }
+  ])
 }