import { AtomInterface } from './Atom'; type StoreProxyAtoms = { readonly [K in keyof S as S[K] extends AtomInterface ? K : never]: S[K] extends AtomInterface ? T : never; }; type AnyFunction = (...args: any[]) => any; type StoreProxyMethods = { readonly [K in keyof S as S[K] extends AnyFunction ? K : never]: S[K]; }; interface StoreInterface { destroy?: () => void; } type StoreProxy = StoreProxyAtoms & StoreProxyMethods; interface StoreConstructable { new (...args: unknown[]): T & StoreInterface; } type StoreDefinition = { storeId: string; storeClass: StoreConstructable; }; export { AnyFunction, StoreConstructable, StoreDefinition, StoreInterface, StoreProxy, StoreProxyAtoms, };