|
1 | | -export interface Reducer extends Function { |
2 | | - (state: any, action: any): any; |
3 | | -} |
| 1 | +declare namespace ngRedux { |
| 2 | + export interface Reducer extends Function { |
| 3 | + (state: any, action: any): any; |
| 4 | + } |
4 | 5 |
|
5 | | -export interface Dispatch extends Function { |
6 | | - (action: any): any; |
7 | | -} |
| 6 | + export interface Dispatch extends Function { |
| 7 | + (action: any): any; |
| 8 | + } |
8 | 9 |
|
9 | | -export interface MiddlewareArg { |
10 | | - dispatch: Dispatch; |
11 | | - getState: Function; |
12 | | -} |
| 10 | + export interface MiddlewareArg { |
| 11 | + dispatch: Dispatch; |
| 12 | + getState: Function; |
| 13 | + } |
13 | 14 |
|
14 | | -export interface Middleware extends Function { |
15 | | - (obj: MiddlewareArg): Function; |
16 | | -} |
| 15 | + export interface Middleware extends Function { |
| 16 | + (obj: MiddlewareArg): Function; |
| 17 | + } |
17 | 18 |
|
18 | | -export interface INgRedux { |
19 | | - getReducer(): Reducer; |
20 | | - replaceReducer(nextReducer: Reducer): void; |
21 | | - dispatch(action: any): any; |
22 | | - getState(): any; |
23 | | - subscribe(listener: Function): Function; |
24 | | - connect( |
25 | | - mapStateToTarget: (state: any) => Object, |
26 | | - mapDispatchToTarget?: Object | ((dispatch: Function) => Object) |
27 | | - ): (target: Function | Object) => () => void; |
28 | | -} |
| 19 | + export interface INgRedux { |
| 20 | + getReducer(): Reducer; |
| 21 | + replaceReducer(nextReducer: Reducer): void; |
| 22 | + dispatch(action: any): any; |
| 23 | + getState(): any; |
| 24 | + subscribe(listener: Function): Function; |
| 25 | + connect( |
| 26 | + mapStateToTarget: (state: any) => Object, |
| 27 | + mapDispatchToTarget?: Object | ((dispatch: Function) => Object) |
| 28 | + ): (target: Function | Object) => () => void; |
| 29 | + } |
29 | 30 |
|
30 | | -export interface INgReduxProvider { |
31 | | - createStoreWith(reducer: Reducer, middlewares?: Array<Middleware | string>, storeEnhancers?: Function[], initialState?: any): void; |
| 31 | + export interface INgReduxProvider { |
| 32 | + createStoreWith(reducer: Reducer, middlewares?: Array<Middleware | string>, storeEnhancers?: Function[], initialState?: any): void; |
| 33 | + } |
32 | 34 | } |
33 | 35 |
|
34 | | -export var ngRedux: string; |
35 | | -export default ngRedux; |
| 36 | +declare var ngRedux: string; |
| 37 | +export as namespace ngRedux; |
| 38 | +export = ngRedux; |
0 commit comments