/** * WordPress dependencies */ import type { createRegistry } from '@wordpress/data'; type WPDataRegistry = ReturnType; export interface Action> { type: Type; payload: Payload; } type CurriedState = F extends (state: State, ...args: infer P) => infer R ? (...args: P) => R : F; export type ThunkArgs, CombinedAction, Selectors extends MapOf> = { select: { [key in keyof Selectors]: CurriedState; }; dispatch: ActionCreators & ((action: CombinedAction) => void); registry: WPDataRegistry; }; export type Dispatcher = (t: DispatcherArgs) => void | Promise; type MapOf = { [name: string]: T; }; export type ActionCreator = (...args: any[]) => any | Generator; export type Control = Function; export type Resolver = Function | Generator; export type Selector = Function; export interface StoreConfig, CombinedAction, Selectors extends MapOf> { initialState?: State; actions?: ActionCreators; controls?: MapOf; reducer: (state: State, action: CombinedAction) => State; resolvers?: MapOf; selectors?: Selectors; } export {}; //# sourceMappingURL=store-types.d.ts.map