Skip to content

Commit 7b3d5a6

Browse files
committed
Merge pull request DefinitelyTyped#7758 from bioball/patch-2
Update redux-thunk.d.ts
2 parents 5e269ce + 75249b9 commit 7b3d5a6

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

redux-thunk/redux-thunk-tests.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
/// <reference path="../express/express.d.ts" />
55

66
import { createStore, applyMiddleware, Store, Dispatch } from 'redux';
7-
import thunk from 'redux-thunk';
8-
import { ThunkInterface } from 'redux-thunk';
7+
import * as thunk from 'redux-thunk';
8+
import ThunkInterface = ReduxThunk.ThunkInterface;
99
import { Promise } from 'es6-promise';
1010

1111
declare var rootReducer: Function;

redux-thunk/redux-thunk.d.ts

+7-10
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,14 @@
55

66
/// <reference path="../redux/redux.d.ts" />
77

8-
declare module "redux-thunk" {
9-
import { Middleware, Dispatch } from 'redux';
10-
11-
export interface Thunk extends Middleware { }
12-
8+
declare module ReduxThunk {
9+
export interface Thunk extends Redux.Middleware {}
1310
export interface ThunkInterface {
14-
<T>(dispatch: Dispatch, getState?: () => T): any;
11+
<T>(dispatch: Redux.Dispatch, getState?: () => T): any;
1512
}
16-
17-
var thunk: Thunk;
18-
19-
export default thunk;
2013
}
2114

15+
declare module "redux-thunk" {
16+
var thunk: ReduxThunk.Thunk;
17+
export = thunk;
18+
}

0 commit comments

Comments
 (0)