]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix: type buildRejected reasonCode as ReasonCodeEnumType instead of string
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 27 Mar 2026 12:55:08 +0000 (13:55 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 27 Mar 2026 12:55:08 +0000 (13:55 +0100)
commitae9f9cd6a68dc0fd21f55a31693d67179646e40d
tree5e2af070e23debbfebd8f4d77f55c178a3182f69
parenta2fc93879a836c5a6a27789b6c372fcb9f34e6e1
fix: type buildRejected reasonCode as ReasonCodeEnumType instead of string

Eliminates the pointless enum→string→enum round-trip: the callback
parameter is now typed as ReasonCodeEnumType directly, removing the
as-string casts at call sites and the reverse keyof-typeof reconversion
in callers.
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-enforceMessageLimits.test.ts