From 4e782ee257d5140eda529d72495ccbd4e4bcc882 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 17 Mar 2026 12:23:51 +0100 Subject: [PATCH] refactor: replace const enum with enum for cross-module runtime compatibility --- src/types/ocpp/1.6/Requests.ts | 2 +- src/types/ocpp/ErrorType.ts | 2 +- src/types/ocpp/MessageType.ts | 2 +- src/types/ocpp/OCPPVersion.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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', -- 2.53.0