From ac23e8a37f08bb8ec49ab4675745ca71fab5db7f Mon Sep 17 00:00:00 2001 From: Daniel Chao Date: Sat, 23 Jan 2016 23:09:19 -0800 Subject: [PATCH 1/6] Update redux-thunk.d.ts There's no "default" export in redux-thunk. --- redux-thunk/redux-thunk.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redux-thunk/redux-thunk.d.ts b/redux-thunk/redux-thunk.d.ts index 5e125e3bc..334a02997 100644 --- a/redux-thunk/redux-thunk.d.ts +++ b/redux-thunk/redux-thunk.d.ts @@ -16,6 +16,6 @@ declare module "redux-thunk" { var thunk: Thunk; - export default thunk; + export = thunk; } From dc67e546776414907ad8f655bfeb50a069e9400d Mon Sep 17 00:00:00 2001 From: Daniel Chao Date: Sat, 23 Jan 2016 23:14:48 -0800 Subject: [PATCH 2/6] Update redux-thunk-tests.ts --- redux-thunk/redux-thunk-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redux-thunk/redux-thunk-tests.ts b/redux-thunk/redux-thunk-tests.ts index 56cf81f4f..3a83e8058 100644 --- a/redux-thunk/redux-thunk-tests.ts +++ b/redux-thunk/redux-thunk-tests.ts @@ -4,7 +4,7 @@ /// import { createStore, applyMiddleware, Store, Dispatch } from 'redux'; -import thunk from 'redux-thunk'; +import * as thunk from 'redux-thunk'; import { ThunkInterface } from 'redux-thunk'; import { Promise } from 'es6-promise'; From f62d46a6538d768d2c00d2075fee4620bf24b864 Mon Sep 17 00:00:00 2001 From: Daniel Chao Date: Sat, 23 Jan 2016 23:19:24 -0800 Subject: [PATCH 3/6] Update redux-thunk.d.ts Namespace interface exports under another module --- redux-thunk/redux-thunk.d.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/redux-thunk/redux-thunk.d.ts b/redux-thunk/redux-thunk.d.ts index 334a02997..7208bcaf0 100644 --- a/redux-thunk/redux-thunk.d.ts +++ b/redux-thunk/redux-thunk.d.ts @@ -5,17 +5,15 @@ /// -declare module "redux-thunk" { +declare module ReduxThunk { import { Middleware, Dispatch } from 'redux'; - - export interface Thunk extends Middleware { } - + export interface Thunk extends Middleware {}; export interface ThunkInterface { (dispatch: Dispatch, getState?: () => T): any; } - - var thunk: Thunk; - - export = thunk; } +declare module "redux-thunk" { + var thunk: ReduxThunk.Thunk; + export = thunk; +} From 3d886c4396e07a1b488cc4e6229e9287e3f3aa2c Mon Sep 17 00:00:00 2001 From: Daniel Chao Date: Sat, 23 Jan 2016 23:20:31 -0800 Subject: [PATCH 4/6] Update redux-thunk-tests.ts --- redux-thunk/redux-thunk-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redux-thunk/redux-thunk-tests.ts b/redux-thunk/redux-thunk-tests.ts index 3a83e8058..df46fb92e 100644 --- a/redux-thunk/redux-thunk-tests.ts +++ b/redux-thunk/redux-thunk-tests.ts @@ -5,7 +5,7 @@ import { createStore, applyMiddleware, Store, Dispatch } from 'redux'; import * as thunk from 'redux-thunk'; -import { ThunkInterface } from 'redux-thunk'; +import ThunkInterface = ReduxThunk.ThunkInterface; import { Promise } from 'es6-promise'; declare var rootReducer: Function; From 81f1548274fd76de5ae34e375241890c0827315a Mon Sep 17 00:00:00 2001 From: Daniel Chao Date: Sat, 23 Jan 2016 23:26:11 -0800 Subject: [PATCH 5/6] Update redux-thunk.d.ts --- redux-thunk/redux-thunk.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/redux-thunk/redux-thunk.d.ts b/redux-thunk/redux-thunk.d.ts index 7208bcaf0..c660ae30c 100644 --- a/redux-thunk/redux-thunk.d.ts +++ b/redux-thunk/redux-thunk.d.ts @@ -5,9 +5,10 @@ /// +import { Middleware, Dispatch } from 'redux'; + declare module ReduxThunk { - import { Middleware, Dispatch } from 'redux'; - export interface Thunk extends Middleware {}; + export interface Thunk extends Middleware {} export interface ThunkInterface { (dispatch: Dispatch, getState?: () => T): any; } From 75249b97104d00c1ca2451ac29369009a5f2b101 Mon Sep 17 00:00:00 2001 From: Dan Chao Date: Sat, 23 Jan 2016 23:44:31 -0800 Subject: [PATCH 6/6] fix dat thunkiness --- redux-thunk/redux-thunk.d.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/redux-thunk/redux-thunk.d.ts b/redux-thunk/redux-thunk.d.ts index c660ae30c..aafaa0453 100644 --- a/redux-thunk/redux-thunk.d.ts +++ b/redux-thunk/redux-thunk.d.ts @@ -5,12 +5,10 @@ /// -import { Middleware, Dispatch } from 'redux'; - declare module ReduxThunk { - export interface Thunk extends Middleware {} + export interface Thunk extends Redux.Middleware {} export interface ThunkInterface { - (dispatch: Dispatch, getState?: () => T): any; + (dispatch: Redux.Dispatch, getState?: () => T): any; } }