diff --git a/types/redux-first-router/redux-first-router-tests.ts b/types/redux-first-router/redux-first-router-tests.ts index c3b99fbbdf..76734630d8 100644 --- a/types/redux-first-router/redux-first-router-tests.ts +++ b/types/redux-first-router/redux-first-router-tests.ts @@ -127,7 +127,7 @@ const action: ReduxFirstRouterAction = { }; redirect(action); // $ExpectType Action -// $ExpectType Store +// $ExpectType Store, AnyAction> store; store.getState().location.routesMap; // $ExpectType RoutesMap diff --git a/types/tinajs__tina-redux/index.d.ts b/types/tinajs__tina-redux/index.d.ts index 5094c18604..922fbb5dcc 100644 --- a/types/tinajs__tina-redux/index.d.ts +++ b/types/tinajs__tina-redux/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/tinajs__tina-redux // TypeScript Version: 2.8 -import { Store, Dispatch } from "redux"; +import { Store, Dispatch, Action } from "redux"; type MapStateToProps = (state: any) => any; type mapDispatchToProps = (dispatch: Dispatch) => any; @@ -15,8 +15,8 @@ interface HOC { methods: object; } -declare class TinaRedux { - constructor(reduxStore: Store); +declare class TinaRedux { + constructor(reduxStore: Store); connect(mapState?: MapStateToProps, mapDispatch?: mapDispatchToProps): HOC; } diff --git a/types/tinajs__tina-redux/tinajs__tina-redux-tests.ts b/types/tinajs__tina-redux/tinajs__tina-redux-tests.ts index d4a7c2225f..81a17acf80 100644 --- a/types/tinajs__tina-redux/tinajs__tina-redux-tests.ts +++ b/types/tinajs__tina-redux/tinajs__tina-redux-tests.ts @@ -9,14 +9,14 @@ interface Todo { interface TodoAction extends Action, Todo {} -const intialState: Todo[] = [ +const initialState: Todo[] = [ { id: 1, text: "Star Tina.js", completed: false }, { id: 2, text: "Star Tina-Redux", completed: true }, { id: 3, text: "Build a mini-program with Tina.js", completed: false }, { id: 4, text: "Add to Showcase of Tina.js", completed: false } ]; -const todos = (state = intialState, action: TodoAction) => { +const todos = (state = initialState, action: TodoAction) => { switch (action.type) { case "ADD_TODO": return [