import { ModelDecoratorConfiguration } from "../interfaces/model-decorator-configuration" ; import { RouterModuleConfig } from "../interfaces/router-module-config" ; export const routeContainer = new ( class { state : RouterModuleConfig = { } ; user : { [ key ] : any ; } ; modelDecorators : Array < ModelDecoratorConfiguration > = new Array < ModelDecoratorConfiguration > ( ) ; add ( routerConfig ) { this . state = routerConfig ; } get ( ) { return this . state ; } getUser ( ) { return this . user ; } setUser ( user ) { this . user = user ; } addModelDecorator ( target , data , type ) { this . modelDecorators . push ( { target : target , functions : data , type : type } ) ; } getModelDecorator ( target , type ) { return this . modelDecorators . filter ( t => t . target == target && t . type == type ) [ 0 ] ; } } ) ( ) ;