import{Container,inject}from'dependency-inject'classStore{num=1}classAction{
@inject(Store)privatestore: StoresetNum(num: number){this.store.num=num}}// init storeconstcontainer=newContainer()container.set(Store,newStore())container.set(Action,newAction())// get data with injectedconststore=container.get(Store)constaction=container.get(Action)action.setNum(2)console.log(store.num)// 2