refactor: use the same empty function everywhere
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 20 Jan 2024 18:55:54 +0000 (19:55 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 20 Jan 2024 18:55:54 +0000 (19:55 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/OCPPResponseService.ts

index 738aa5ae4ffea2c8ea2f7ce7013826241eabb1c1..20cfab6e967a6ee2e9f3278519124ff5a9b25532 100644 (file)
@@ -10,7 +10,7 @@ import type {
   OCPPVersion,
   RequestCommand
 } from '../../types/index.js'
-import { logger } from '../../utils/index.js'
+import { Constants, logger } from '../../utils/index.js'
 type Ajv = _Ajv.default
 // eslint-disable-next-line @typescript-eslint/no-redeclare
 const Ajv = _Ajv.default
@@ -96,9 +96,7 @@ export abstract class OCPPResponseService {
     )
   }
 
-  protected emptyResponseHandler (): void {
-    /* This is intentional */
-  }
+  protected emptyResponseHandler = Constants.EMPTY_FUNCTION
 
   private getJsonRequestValidateFunction<T extends JsonType>(
     commandName: RequestCommand,