X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils%2FConfiguration.ts;h=9356785deaf2af7dfba30ff313d9bfbf82f8ee34;hb=23c97c471a4b7194aaac0620e935341de07eb1ad;hp=e1fd11c731af1024ebfd08dfba373eb82680abc2;hpb=5dcb9d4945027c6be39e4342f1627ea2da3813b7;p=e-mobility-charging-stations-simulator.git diff --git a/src/utils/Configuration.ts b/src/utils/Configuration.ts index e1fd11c7..9356785d 100644 --- a/src/utils/Configuration.ts +++ b/src/utils/Configuration.ts @@ -513,22 +513,22 @@ export class Configuration { private static warnDeprecatedConfigurationKey ( key: string, - sectionName?: string, + configurationSection?: ConfigurationSection, logMsgToAppend = '' ): void { if ( - sectionName != null && - Configuration.getConfigurationData()?.[sectionName as keyof ConfigurationData] != null && + configurationSection != null && + Configuration.getConfigurationData()?.[configurationSection as keyof ConfigurationData] != + null && ( - Configuration.getConfigurationData()?.[sectionName as keyof ConfigurationData] as Record< - string, - unknown - > + Configuration.getConfigurationData()?.[ + configurationSection as keyof ConfigurationData + ] as Record )[key] != null ) { console.error( `${chalk.green(logPrefix())} ${chalk.red( - `Deprecated configuration key '${key}' usage in section '${sectionName}'${ + `Deprecated configuration key '${key}' usage in section '${configurationSection}'${ logMsgToAppend.trim().length > 0 ? `. ${logMsgToAppend}` : '' }` )}`