refactor(simulator): use generic type in OCPP payload validation code
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / OCPPResponseService.ts
index 90f92169cd4c76f8a49f37fc3635a4778689cd86..b76fde6a4b3067d907064bf46ccdb79c76e75f25 100644 (file)
@@ -72,10 +72,7 @@ export abstract class OCPPResponseService {
       return true;
     }
     if (this.jsonRequestValidateFunctions.has(commandName) === false) {
-      this.jsonRequestValidateFunctions.set(
-        commandName,
-        this.ajv.compile<JsonType>(schema).bind(this),
-      );
+      this.jsonRequestValidateFunctions.set(commandName, this.ajv.compile<T>(schema).bind(this));
     }
     const validate = this.jsonRequestValidateFunctions.get(commandName)!;
     if (validate(payload)) {