fix(simulator): fix brown paper bag bugs after helpers semantic fix
[e-mobility-charging-stations-simulator.git] / src / performance / storage / Storage.ts
index d85d8c415efdd1b254694976597bfd722af4c42d..4b8f4c7cbb1c7f3c9cba6ceacfa709209565ac09 100644 (file)
@@ -1,10 +1,10 @@
-// Copyright Jerome Benoit. 2021. All Rights Reserved.
+// Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
 
-import { URL } from 'url';
+import { URL } from 'node:url';
 
 import type { EmptyObject } from '../../types/EmptyObject';
 import type { HandleErrorParams } from '../../types/Error';
-import type Statistics from '../../types/Statistics';
+import type { Statistics } from '../../types/Statistics';
 import { DBName, StorageType } from '../../types/Storage';
 import logger from '../../utils/Logger';
 import Utils from '../../utils/Utils';
@@ -12,7 +12,7 @@ import Utils from '../../utils/Utils';
 export abstract class Storage {
   protected readonly storageUri: URL;
   protected readonly logPrefix: string;
-  protected dbName: string;
+  protected dbName!: string;
 
   constructor(storageUri: string, logPrefix: string) {
     this.storageUri = new URL(storageUri);
@@ -38,7 +38,7 @@ export abstract class Storage {
     }
   }
 
-  protected getDBNameFromStorageType(type: StorageType): DBName {
+  protected getDBNameFromStorageType(type: StorageType): DBName | undefined {
     switch (type) {
       case StorageType.MARIA_DB:
         return DBName.MARIA_DB;