@igo2/core
Version:
28 lines (27 loc) • 1.02 kB
TypeScript
import { HttpBackend } from '@angular/common/http';
import { ConfigOptions } from './config.interface';
import * as i0 from "@angular/core";
export declare class ConfigService<T extends object = Record<string, any>> {
private config;
private httpClient;
private configDeprecated;
private _isLoaded$;
isLoaded$: import("rxjs").Observable<boolean>;
constructor(handler: HttpBackend);
/**
* Use to get the all config file (merge from environnement.ts and config.json)
*/
getConfigs(): any;
/**
* Use to get the data found in config file
*/
getConfig<T = any>(key: string, defaultValue?: unknown): T;
private handleDeprecatedConfig;
private handleDeprecationPossibility;
/**
* This method loads "[path]" to get all config's variables
*/
load(options: ConfigOptions<T>): void | Promise<unknown>;
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigService<any>, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigService<any>>;
}