From: Jérôme Benoit Date: Wed, 26 Jul 2023 22:13:49 +0000 (+0200) Subject: fix: fix configuration callback property type X-Git-Tag: v1.2.20~124 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=0e8e6cbe5341dd888cb63cfc598ef0088ca51ff8;p=e-mobility-charging-stations-simulator.git fix: fix configuration callback property type Signed-off-by: Jérôme Benoit --- diff --git a/src/utils/Configuration.ts b/src/utils/Configuration.ts index f03e0472..2491757b 100644 --- a/src/utils/Configuration.ts +++ b/src/utils/Configuration.ts @@ -47,7 +47,7 @@ export class Configuration { [ConfigurationSection.uiServer, Configuration.buildUIServerSection()], ]); - private static configurationChangeCallback: () => Promise; + private static configurationChangeCallback?: () => Promise; private constructor() { // This is intentional @@ -509,7 +509,7 @@ export class Configuration { delete Configuration.configurationData; Configuration.configurationSectionCache.clear(); if (!isUndefined(Configuration.configurationChangeCallback)) { - Configuration.configurationChangeCallback().catch((error) => { + Configuration.configurationChangeCallback!().catch((error) => { throw typeof error === 'string' ? new Error(error) : error; }); }