Skip to content

Commit

Permalink
re-add ts expect error checks
Browse files Browse the repository at this point in the history
  • Loading branch information
allroundexperts committed Apr 8, 2024
1 parent e13257f commit 64e701c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions __mocks__/@react-navigation/native/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {useIsFocused as realUseIsFocused, useTheme as realUseTheme} from '@react

// We only want these mocked for storybook, not jest
const useIsFocused: typeof realUseIsFocused = process.env.NODE_ENV === 'test' ? realUseIsFocused : () => true;

// @ts-expect-error as we're mocking this function
const useTheme: typeof realUseTheme = process.env.NODE_ENV === 'test' ? realUseTheme : () => ({});

Expand Down
7 changes: 7 additions & 0 deletions src/stories/Form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,19 @@ const story: Meta<typeof FormProvider> = {
title: 'Components/Form',
component: FormProvider,
subcomponents: {
// @ts-expect-error Subcomponent passes props with unknown type causing a TS error
InputWrapper,
// @ts-expect-error Subcomponent passes props with unknown type causing a TS error
TextInput,
// @ts-expect-error Subcomponent passes props with unknown type causing a TS error
AddressSearch,
// @ts-expect-error Subcomponent passes props with unknown type causing a TS error
CheckboxWithLabel,
// @ts-expect-error Subcomponent passes props with unknown type causing a TS error
Picker,
// @ts-expect-error Subcomponent passes props with unknown type causing a TS error
StateSelector,
// @ts-expect-error Subcomponent passes props with unknown type causing a TS error
DatePicker,
},
};
Expand Down

0 comments on commit 64e701c

Please sign in to comment.