]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor(ocpp): use union types in common code where possible
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 16 Mar 2026 12:27:33 +0000 (13:27 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 16 Mar 2026 12:27:33 +0000 (13:27 +0100)
commitce77ea9710defa1c9783add2b0d37543f32b10c1
tree831d23a043fbff8711e9b07ce2d3120d6fd3d946
parentb994f09525f85f2d0d54f4b15c39bdd6990895d7
refactor(ocpp): use union types in common code where possible

- OCPPServiceUtils: use SampledValue union in generic constraints
  instead of inline OCPP16SampledValue | OCPP20SampledValue union;
  use StatusNotificationRequest union in satisfies check
- BroadcastChannel: use MeterValuesRequest/Response unions instead
  of OCPP20-specific types in version-dispatched handleMeterValues

Stack-specific types remain in version-switch branches where
TypeScript requires narrowed types for array push operations.
src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts
src/charging-station/ocpp/OCPPServiceUtils.ts