import { OverrideConfigProp } from "../models/interface/override-config-prop" ; export const dynamicContainer = new ( class { private components : Array < { name : string ; instance : any ; } > = [ ] ; private overrideProps : any = { } ; registerComponent ( name , target ) { let componentContainer = this . components . filter ( component => component . instance == target ) [ 0 ] ; if ( ! componentContainer ) this . components . push ( { instance : target , name : name } ) ; } registerOverrideProp ( props ) { if ( props ) Object . keys ( props ) . forEach ( t => this . overrideProps [ t ] = props [ t ] ) ; } getOverrideProp ( name ) { return this . overrideProps [ name ] ; } getComponent ( name ) { return this . components . filter ( component => component . name == name ) [ 0 ] ; } } ) ( ) ;