type MapState = (state: S) => MS; type MapActions = (actions: A) => MA; type Listener = { oldState: MS; run: (state: S) => void; }; export type Store = { state: S; actions: OmitFirstArgOfObj; setState: (newState: S) => void; listeners: Listener[]; }; export type OmitFirstArg = A extends (_store: any, ...args: infer Args) => infer R ? (...args: Args) => R : never; export type OmitFirstArgOfObj = { [key in keyof A]: OmitFirstArg; }; export type AfterUpdateCallback = (newState: S) => void; export declare function makeStore(initialState: S, actions: A): >(mapState?: MapState, mapActions?: MapActions, MA>) => [MS, MA]; export {};