[DURACOM-247] Refactored by using a map of promises

This commit is contained in:
Giuseppe Digilio
2024-04-08 23:04:47 +02:00
parent 115445a6ab
commit 883ceeae27
6 changed files with 90 additions and 22 deletions

View File

@@ -73,9 +73,7 @@ const APP_CONFIG = new InjectionToken<AppConfig>('APP_CONFIG');
const APP_CONFIG_STATE = makeStateKey<AppConfig>('APP_CONFIG_STATE');
export interface LazyDataServicesMap {
[type: string]: () => Promise<Type<HALDataService<any>> | { default: HALDataService<any> }>
}
export type LazyDataServicesMap = Map<string, () => Promise<Type<HALDataService<any>> | { default: HALDataService<any> }>>;
export const APP_DATA_SERVICES_MAP: InjectionToken<LazyDataServicesMap> = new InjectionToken<LazyDataServicesMap>('APP_DATA_SERVICES_MAP');