From: Jérôme Benoit Date: Thu, 19 Sep 2024 13:29:20 +0000 (+0200) Subject: refactor: turn on `noImplicitOverride` in TS configuration X-Git-Tag: ocpp-server@v1.5.2~47 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=6375d3cdd7f42a6e125976df194f4fe689d24113;p=e-mobility-charging-stations-simulator.git refactor: turn on `noImplicitOverride` in TS configuration Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts b/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts index c99bf8ed..9582e171 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts @@ -504,7 +504,7 @@ export class OCPP16ServiceUtils extends OCPPServiceUtils { return key.visible } - public static parseJsonSchemaFile( + public static override parseJsonSchemaFile( relativePath: string, moduleName?: string, methodName?: string diff --git a/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts b/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts index 75d61731..a02a3cea 100644 --- a/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts +++ b/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts @@ -6,7 +6,7 @@ import { type JsonType, OCPPVersion } from '../../../types/index.js' import { OCPPServiceUtils } from '../OCPPServiceUtils.js' export class OCPP20ServiceUtils extends OCPPServiceUtils { - public static parseJsonSchemaFile( + public static override parseJsonSchemaFile( relativePath: string, moduleName?: string, methodName?: string diff --git a/src/charging-station/ui-server/UIHttpServer.ts b/src/charging-station/ui-server/UIHttpServer.ts index 4445ce24..0b26ce1d 100644 --- a/src/charging-station/ui-server/UIHttpServer.ts +++ b/src/charging-station/ui-server/UIHttpServer.ts @@ -45,7 +45,7 @@ export class UIHttpServer extends AbstractUIServer { return logPrefix(logMsg) } - public constructor (protected readonly uiServerConfiguration: UIServerConfiguration) { + public constructor (protected override readonly uiServerConfiguration: UIServerConfiguration) { super(uiServerConfiguration) } diff --git a/src/charging-station/ui-server/UIWebSocketServer.ts b/src/charging-station/ui-server/UIWebSocketServer.ts index 2d80489f..ba557644 100644 --- a/src/charging-station/ui-server/UIWebSocketServer.ts +++ b/src/charging-station/ui-server/UIWebSocketServer.ts @@ -42,7 +42,7 @@ export class UIWebSocketServer extends AbstractUIServer { return logPrefix(logMsg) } - public constructor (protected readonly uiServerConfiguration: UIServerConfiguration) { + public constructor (protected override readonly uiServerConfiguration: UIServerConfiguration) { super(uiServerConfiguration) this.webSocketServer = new WebSocketServer({ handleProtocols, diff --git a/tsconfig.json b/tsconfig.json index 388e8110..bdded257 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,6 +12,8 @@ "verbatimModuleSyntax": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, - "forceConsistentCasingInFileNames": true - } + "forceConsistentCasingInFileNames": true, + "noImplicitOverride": true + }, + "include": ["*.ts", "src/**/*.ts", "tests/**/*.ts"] } diff --git a/ui/web/tsconfig.json b/ui/web/tsconfig.json index 4b7de400..d27bb513 100644 --- a/ui/web/tsconfig.json +++ b/ui/web/tsconfig.json @@ -4,6 +4,7 @@ "compilerOptions": { "experimentalDecorators": true, "allowSyntheticDefaultImports": true, + "noImplicitOverride": true, "sourceMap": true, "composite": true, "baseUrl": "./",