Skip to content

Commit

Permalink
Improve thunk types slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
OzzieOrca committed May 30, 2019
1 parent 650d4c9 commit d44959a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/containers/WelcomeScreen/__tests__/WelcomeScreen.tsx
Expand Up @@ -9,7 +9,7 @@ import * as common from '../../../utils/common';
import { trackActionWithoutData } from '../../../actions/analytics';
import { ACTIONS } from '../../../constants';

const next = jest.fn(() => ({ type: 'next' }));
const next = jest.fn(() => () => {});

jest.mock('react-native-device-info');
jest.mock('../../../actions/analytics');
Expand Down
7 changes: 4 additions & 3 deletions src/containers/WelcomeScreen/index.tsx
Expand Up @@ -3,7 +3,7 @@ import { connect } from 'react-redux';
import { SafeAreaView } from 'react-native';
import { useTranslation } from 'react-i18next';
import { useNavigationParam } from 'react-navigation-hooks';
import { ThunkDispatch } from 'redux-thunk';
import { ThunkDispatch, ThunkAction } from 'redux-thunk';

import { Flex, Text, Button } from '../../components/common';
import BottomButton from '../../components/BottomButton';
Expand All @@ -18,8 +18,9 @@ const WelcomeScreen = ({
next,
}: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
dispatch: ThunkDispatch<any, null, any>;
next: (params: { signin: boolean }) => {};
dispatch: ThunkDispatch<any, null, never>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
next: (params: { signin: boolean }) => ThunkAction<void, any, null, never>;
}) => {
useEffect(() => {
disableBack.add();
Expand Down

0 comments on commit d44959a

Please sign in to comment.