From: Jérôme Benoit Date: Tue, 17 Mar 2026 11:23:51 +0000 (+0100) Subject: refactor: replace const enum with enum for cross-module runtime compatibility X-Git-Tag: ocpp-server@v3.1.2~7 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=4e782ee257d5140eda529d72495ccbd4e4bcc882;p=e-mobility-charging-stations-simulator.git refactor: replace const enum with enum for cross-module runtime compatibility --- diff --git a/src/types/ocpp/1.6/Requests.ts b/src/types/ocpp/1.6/Requests.ts index 644e0d4c..f31ce904 100644 --- a/src/types/ocpp/1.6/Requests.ts +++ b/src/types/ocpp/1.6/Requests.ts @@ -67,7 +67,7 @@ export enum OCPP16RequestCommand { STOP_TRANSACTION = 'StopTransaction', } -export const enum ResetType { +export enum ResetType { HARD = 'Hard', SOFT = 'Soft', } diff --git a/src/types/ocpp/ErrorType.ts b/src/types/ocpp/ErrorType.ts index d6367e16..40a6e735 100644 --- a/src/types/ocpp/ErrorType.ts +++ b/src/types/ocpp/ErrorType.ts @@ -1,4 +1,4 @@ -export const enum ErrorType { +export enum ErrorType { // Payload for Action is syntactically incorrect or not conform the PDU structure for Action FORMAT_VIOLATION = 'FormatViolation', /** @deprecated use FORMAT_VIOLATION instead */ diff --git a/src/types/ocpp/MessageType.ts b/src/types/ocpp/MessageType.ts index 0ac13fa2..1346ee82 100644 --- a/src/types/ocpp/MessageType.ts +++ b/src/types/ocpp/MessageType.ts @@ -1,4 +1,4 @@ -export const enum MessageType { +export enum MessageType { CALL_MESSAGE = 2, // Caller to Callee CALL_RESULT_MESSAGE = 3, // Callee to Caller CALL_ERROR_MESSAGE = 4, // Callee to Caller diff --git a/src/types/ocpp/OCPPVersion.ts b/src/types/ocpp/OCPPVersion.ts index 2bc8210c..a19fc280 100644 --- a/src/types/ocpp/OCPPVersion.ts +++ b/src/types/ocpp/OCPPVersion.ts @@ -1,4 +1,4 @@ -export const enum OCPPVersion { +export enum OCPPVersion { VERSION_16 = '1.6', VERSION_20 = '2.0', VERSION_201 = '2.0.1',