forked from angular-redux/ng-redux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
39 lines (32 loc) · 1013 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
declare module ngRedux {
interface Reducer extends Function {
(state: any, action: any): any;
}
interface Dispatch extends Function {
(action: any): any;
}
interface MiddlewareArg {
dispatch: Dispatch;
getState: Function;
}
interface Middleware extends Function {
(obj: MiddlewareArg): Function;
}
interface INgRedux {
getReducer(): Reducer;
replaceReducer(nextReducer: Reducer): void;
dispatch(action: any): any;
getState(): any;
subscribe(listener: Function): Function;
connect(
mapStateToTarget: (state: any) => Object,
mapDispatchToTarget?: Object | ((dispatch: Function) => Object)
): (target: Function | Object) => () => void;
}
interface INgReduxProvider {
createStoreWith(reducer: Reducer, middlewares?: Array<Middleware | string>, storeEnhancers?: Function[]): void;
}
}
declare module "ngRedux" {
export = ngRedux;
}