Lint fixed

This commit is contained in:
Stephen Ierodiaconou
2017-07-19 10:30:28 +01:00
parent 9daad0b851
commit e51079cdb2
4 changed files with 12 additions and 18 deletions
+4 -4
View File
@@ -45,7 +45,7 @@ declare function nextReduxWrapper<TInitialState = any, TStateProps = any, TDispa
): (Component: Component<TOwnProps & TMergedProps>) => NextReduxWrappedComponent;
declare namespace nextReduxWrapper {
export interface Options<TInitialState, TStateProps, TDispatchProps, TOwnProps, TMergedProps> {
interface Options<TInitialState, TStateProps, TDispatchProps, TOwnProps, TMergedProps> {
createStore: NextStoreCreator<TInitialState, TStateProps, TDispatchProps, TOwnProps, TMergedProps>;
debug?: boolean;
storeKey?: string;
@@ -54,11 +54,11 @@ declare namespace nextReduxWrapper {
mergeProps?: MergeProps<TStateProps, TDispatchProps, TOwnProps, TMergedProps>;
connectOptions?: ConnectOptions;
}
export interface StoreCreatorOptions<TInitialState, TStateProps, TDispatchProps, TOwnProps, TMergedProps> extends Options<TInitialState, TStateProps, TDispatchProps, TOwnProps, TMergedProps> {
interface StoreCreatorOptions<TInitialState, TStateProps, TDispatchProps, TOwnProps, TMergedProps> extends Options<TInitialState, TStateProps, TDispatchProps, TOwnProps, TMergedProps> {
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;
}
@@ -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<InitialState> = (state: InitialState = {foo: ''}, action: AnyAction): InitialState => {
switch (action.type) {
case 'FOO':
return {...state, foo: action.payload};
@@ -64,7 +64,8 @@ const com4 = withRedux<InitialState, ConnectStateProps>(
const com5 = withRedux<InitialState, ConnectStateProps, DispatchProps, OwnProps, MergedProps>(
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<InitialState, ConnectStateProps, DispatchProps, OwnProps, MergedProps>(
@@ -75,7 +76,8 @@ const com6 = withRedux<InitialState, ConnectStateProps, DispatchProps, OwnProps,
return createStore(reducer, initialState);
},
(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 com7 = withRedux({
+1 -1
View File
@@ -8,7 +8,7 @@
"jsx": "react",
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
+1 -9
View File
@@ -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" }