Permit to run code in async scope in the OCPP stack
[e-mobility-charging-stations-simulator.git] / src / charging-station / AutomaticTransactionGenerator.ts
index 232ad2cd4533ce68ac79e05b676599cf4eeafd42..e32c3c98109f6f520142d1499411b35d12babfcc 100644 (file)
@@ -93,7 +93,10 @@ export default class AutomaticTransactionGenerator extends AsyncResource {
     }
     if (this.connectorsStatus.get(connectorId)?.start === false) {
       this.runInAsyncScope(
-        this.internalStartConnector.bind(this) as (this: this, ...args: any[]) => unknown,
+        this.internalStartConnector.bind(this) as (
+          this: AutomaticTransactionGenerator,
+          ...args: any[]
+        ) => void,
         this,
         connectorId
       );