import{TObject,importState}from'../TStore.plugin';importTStorefrom'../TStore.plugin';//interface.ts//1. declare my moduleinterfaceIAge{myAge: number;newyear(): void;}interfaceICount{myCount: numberadd(n: number): void;}//2. declare type stateexporttypeMyState={age: IAge}&{count: ICount}&TObject;///3. file data storeexportconstcount: ICount={myCount: 1,add(n: number){this.myCount+=n;}}//import one data to state.//importState({ count });exportconstage: IAge={myAge: 1,newyear(){this.myAge++;}};//import one data to state.//importState({ age });//4. import mutil data to state.importState({ age },{ count });/// store.tsexportfunctionuseAppStore(): MyState{returnmystate.useTStore();}constmystate=newTStore<MyState>();exportdefaultmystate;//5. use in componentconststore=useAppStore();store.age.myAge++store.age.newyear()