diff --git a/.eslintrc b/.eslintrc
index 8745278a9..09dbe7f1e 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -38,5 +38,8 @@
"react/jsx-wrap-multilines": 2,
"react/no-string-refs": 0
},
- "plugins": ["@typescript-eslint", "import", "react"]
+ "plugins": ["@typescript-eslint", "import", "react"],
+ "globals": {
+ "JSX": true
+ }
}
diff --git a/src/connect/wrapMapToProps.ts b/src/connect/wrapMapToProps.ts
index f2d5775eb..bb11089dc 100644
--- a/src/connect/wrapMapToProps.ts
+++ b/src/connect/wrapMapToProps.ts
@@ -9,6 +9,7 @@ type StateOrDispatch = S | Dispatch
type AnyProps = { [key: string]: any }
export type MapToProps
= {
+ // eslint-disable-next-line no-unused-vars
(stateOrDispatch: StateOrDispatch, ownProps?: P): FixTypeLater
dependsOnOwnProps?: boolean
}
@@ -18,7 +19,7 @@ export function wrapMapToPropsConstant(
// It seems that the dispatch argument
// could be a dispatch function in some cases (ex: whenMapDispatchToPropsIsMissing)
// and a state object in some others (ex: whenMapStateToPropsIsMissing)
- //
+ // eslint-disable-next-line no-unused-vars
getConstant: (dispatch: Dispatch) => { dispatch?: Dispatch }
) {
return function initConstantSelector(dispatch: Dispatch) {
diff --git a/src/types.ts b/src/types.ts
index e48206385..57ce0b42e 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -1 +1,258 @@
+/* eslint-disable no-unused-vars */
+// TODO Ignoring all unused variables for now
+
+import {
+ ClassAttributes,
+ Component,
+ ComponentClass,
+ ComponentType,
+ StatelessComponent,
+ Context,
+ NamedExoticComponent,
+} from 'react'
+
+import { Action, ActionCreator, AnyAction, Dispatch, Store } from 'redux'
+
+// import hoistNonReactStatics = require('hoist-non-react-statics');
+import type { NonReactStatics } from 'hoist-non-react-statics'
+
export type FixTypeLater = any
+
+/**
+ * This interface can be augmented by users to add default types for the root state when
+ * using `react-redux`.
+ * Use module augmentation to append your own type definition in a your_custom_type.d.ts file.
+ * https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation
+ */
+// tslint:disable-next-line:no-empty-interface
+export interface DefaultRootState {}
+
+export type AnyIfEmpty
+ ? ClassAttributes