import { ServiceContainerConfig } from "../interface/service-container-config" ; import { BaseHttpClientConfig } from "../interface/base-http-client-config" ; export const httpRequestContainer = new ( class { private serviceContainers : ServiceContainerConfig [ ] = new Array < ServiceContainerConfig > ( ) ; private baseConfig : BaseHttpClientConfig ; register ( target , config , type ) { let serviceContainer = this . serviceContainers . filter ( t => t . target == target && t . type == type ) [ 0 ] ; if ( ! serviceContainer ) this . serviceContainers . push ( { target : target , config : config , type : type } ) ; } registerConfig ( httpClientConfig ) { this . baseConfig = httpClientConfig ; } get ( target ) { return this . serviceContainers . filter ( t => t . target == target ) ; } getConfig ( ) { return this . baseConfig ; } } ) ( ) ;