1 | import { Action, MiddlewareAPI } from "redux";
|
2 | import { IReduxActionConstructor, ReduxAction } from "../action";
|
3 | import { IPlugin, ReduxStore } from "../store";
|
4 | import { VirtualStore } from "../virtual-store";
|
5 | export interface IPromiseState {
|
6 | result: any;
|
7 | success: boolean;
|
8 | resolved: boolean;
|
9 | }
|
10 | export interface IPromiseState {
|
11 | PromiseQueue: IPromiseState[];
|
12 | }
|
13 | export declare class PromiseQueue extends VirtualStore<IPromiseState> {
|
14 | }
|
15 | export interface IPromiseActionData<IData> {
|
16 | promise: Promise<IData>;
|
17 | success: IReduxActionConstructor<IData, any>;
|
18 | failed: IReduxActionConstructor<any, any>;
|
19 | }
|
20 | export declare class PromiseAction extends ReduxAction<IPromiseActionData<any>, IPromiseState> {
|
21 | }
|
22 | export declare function promiseMiddleware(store: MiddlewareAPI<any>): (next: any) => (action: Action) => any;
|
23 | export declare class PromisePlugin implements IPlugin<IPromiseState> {
|
24 | __redux_plugin(redux: ReduxStore<IPromiseState>): void;
|
25 | }
|