diff --git a/types/next-redux-wrapper/index.d.ts b/types/next-redux-wrapper/index.d.ts index f65f3f9d73..e6c7ea600e 100644 --- a/types/next-redux-wrapper/index.d.ts +++ b/types/next-redux-wrapper/index.d.ts @@ -45,7 +45,7 @@ declare function nextReduxWrapper) => NextReduxWrappedComponent; declare namespace nextReduxWrapper { - export interface Options { + interface Options { createStore: NextStoreCreator; debug?: boolean; storeKey?: string; @@ -54,11 +54,11 @@ declare namespace nextReduxWrapper { mergeProps?: MergeProps; connectOptions?: ConnectOptions; } - export interface StoreCreatorOptions extends Options { + interface StoreCreatorOptions extends Options { isServer: boolean; req?: IncomingMessage; } - export function setPromise(Promise: any): void; - export function setDebug(debug: boolean): void; + function setPromise(Promise: any): void; + function setDebug(debug: boolean): void; } diff --git a/types/next-redux-wrapper/next-redux-wrapper-tests.tsx b/types/next-redux-wrapper/next-redux-wrapper-tests.tsx index c432ae5ec9..664d793826 100644 --- a/types/next-redux-wrapper/next-redux-wrapper-tests.tsx +++ b/types/next-redux-wrapper/next-redux-wrapper-tests.tsx @@ -1,13 +1,13 @@ import * as React from 'react'; import withRedux = require('next-redux-wrapper'); -import { createStore, Store, AnyAction } from 'redux'; +import { createStore, Reducer, Store, AnyAction } from 'redux'; import { StoreCreatorOptions } from 'next-redux-wrapper'; interface InitialState { foo: string; } -const reducer = (state: InitialState = {foo: ''}, action: AnyAction) => { +const reducer: Reducer = (state: InitialState = {foo: ''}, action: AnyAction): InitialState => { switch (action.type) { case 'FOO': return {...state, foo: action.payload}; @@ -64,7 +64,8 @@ const com4 = withRedux( const com5 = withRedux( makeStore, (state: ReduxStore) => ({foo: state.foo, custom: 'hi'}), - null, (state: Props) => ({foo: state.foo, custom: 'hi'}) + undefined, + (state: Props) => ({foo: state.foo, custom: 'hi'}) )(Page); const com6 = withRedux( @@ -75,7 +76,8 @@ const com6 = withRedux ({foo: state.foo, custom: 'hi'}), - null, (state: Props) => ({foo: state.foo, custom: 'hi'}) + undefined, + (state: Props) => ({foo: state.foo, custom: 'hi'}) )(Page); const com7 = withRedux({ diff --git a/types/next-redux-wrapper/tsconfig.json b/types/next-redux-wrapper/tsconfig.json index f35fb6fa08..75ef2fd85b 100644 --- a/types/next-redux-wrapper/tsconfig.json +++ b/types/next-redux-wrapper/tsconfig.json @@ -8,7 +8,7 @@ "jsx": "react", "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/next-redux-wrapper/tslint.json b/types/next-redux-wrapper/tslint.json index 98f9451050..3db14f85ea 100644 --- a/types/next-redux-wrapper/tslint.json +++ b/types/next-redux-wrapper/tslint.json @@ -1,9 +1 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - // All of the different "export default" lines in the index.d.ts - // appear to be triggering this. Remove this when I know of a way - // to declare a default export across multiple package/subpackages. - "strict-export-declare-modifiers": false - } -} +{ "extends": "dtslint/dt.json" }