From 64e701c6318cb9ceb52345980e181deaf45a63f8 Mon Sep 17 00:00:00 2001 From: Sibtain Ali Date: Mon, 8 Apr 2024 19:51:24 +0500 Subject: [PATCH] re-add ts expect error checks --- __mocks__/@react-navigation/native/index.ts | 1 + src/stories/Form.stories.tsx | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/__mocks__/@react-navigation/native/index.ts b/__mocks__/@react-navigation/native/index.ts index 1b1f027f7b34..9a6680ba0b6e 100644 --- a/__mocks__/@react-navigation/native/index.ts +++ b/__mocks__/@react-navigation/native/index.ts @@ -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 : () => ({}); diff --git a/src/stories/Form.stories.tsx b/src/stories/Form.stories.tsx index ceb2ac7f5627..8a1c2ca0b8f0 100644 --- a/src/stories/Form.stories.tsx +++ b/src/stories/Form.stories.tsx @@ -45,12 +45,19 @@ const story: Meta = { 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, }, };