refactor: add type parameter to OCPP stack for request and response
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / 2.0 / OCPP20ResponseService.ts
index 1eec885f9dc2fd1f3a7bb0043cd1f14479c8c6d2..4984b115e48a03d0315a83eeee28ae2c74e488cf 100644 (file)
@@ -87,11 +87,11 @@ export class OCPP20ResponseService extends OCPPResponseService {
     ) => boolean;
   }
 
-  public async responseHandler(
+  public async responseHandler<ReqType extends JsonType, ResType extends JsonType>(
     chargingStation: ChargingStation,
     commandName: OCPP20RequestCommand,
-    payload: JsonType,
-    requestPayload: JsonType,
+    payload: ResType,
+    requestPayload: ReqType,
   ): Promise<void> {
     if (
       chargingStation.isRegistered() === true ||