From: Jérôme Benoit Date: Sat, 9 Sep 2023 10:49:49 +0000 (+0200) Subject: refactor: switch to public static instead of setter in configuration X-Git-Tag: v1.2.21~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=6501eda9e69fff639911308b3f2de26593ae18c9;p=e-mobility-charging-stations-simulator.git refactor: switch to public static instead of setter in configuration class Signed-off-by: Jérôme Benoit --- diff --git a/src/utils/Configuration.ts b/src/utils/Configuration.ts index b9ba72a5..6b8023ab 100644 --- a/src/utils/Configuration.ts +++ b/src/utils/Configuration.ts @@ -42,6 +42,8 @@ type ConfigurationSectionType = | UIServerConfiguration; export class Configuration { + public static configurationChangeCallback: () => Promise; + private static configurationFile = join( dirname(fileURLToPath(import.meta.url)), 'assets', @@ -64,10 +66,6 @@ export class Configuration { // This is intentional } - public static set configurationChangeCallback(cb: () => Promise) { - Configuration.configurationChangeCallback = cb; - } - public static getConfigurationSection( sectionName: ConfigurationSection, ): T {