refactor: switch to public static instead of setter in configuration
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 9 Sep 2023 10:49:49 +0000 (12:49 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 9 Sep 2023 10:49:49 +0000 (12:49 +0200)
class

Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/utils/Configuration.ts

index b9ba72a5b44b955e308e26b9b77982834efee775..6b8023ab0b2911cb7bf54ef38d21aaaddcfb0c67 100644 (file)
@@ -42,6 +42,8 @@ type ConfigurationSectionType =
   | UIServerConfiguration;
 
 export class Configuration {
+  public static configurationChangeCallback: () => Promise<void>;
+
   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<void>) {
-    Configuration.configurationChangeCallback = cb;
-  }
-
   public static getConfigurationSection<T extends ConfigurationSectionType>(
     sectionName: ConfigurationSection,
   ): T {