From 0813eb90c7e03bb852ffb338ba62064f77c94976 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 2 Aug 2023 17:20:08 -0300 Subject: [PATCH] Fix ts issues --- .../ActionSheet/BottomSheetContent.tsx | 2 +- patches/react-native-ui-lib+7.2.1.patch | 51 +++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/app/containers/ActionSheet/BottomSheetContent.tsx b/app/containers/ActionSheet/BottomSheetContent.tsx index 8a83d8803..ea44cc2d1 100644 --- a/app/containers/ActionSheet/BottomSheetContent.tsx +++ b/app/containers/ActionSheet/BottomSheetContent.tsx @@ -39,7 +39,7 @@ const BottomSheetContent = React.memo(({ options, hasCancel, hide, children }: I testID='action-sheet' data={options} refreshing={false} - keyExtractor={item => item.title} + keyExtractor={(item: TActionSheetOptionsItem) => item.title} bounces={true} renderItem={renderItem} style={{ backgroundColor: colors.focusedBackground }} diff --git a/patches/react-native-ui-lib+7.2.1.patch b/patches/react-native-ui-lib+7.2.1.patch index c98b94959..f4765101b 100644 --- a/patches/react-native-ui-lib+7.2.1.patch +++ b/patches/react-native-ui-lib+7.2.1.patch @@ -183,6 +183,27 @@ index 7847d78..79063d5 100644 export interface ModalProps extends RNModalProps { /** * Blurs the modal background when transparent (iOS only) +diff --git a/node_modules/react-native-ui-lib/src/components/segmentedControl/index.tsx b/node_modules/react-native-ui-lib/src/components/segmentedControl/index.tsx +index 542a16a..b23336e 100644 +--- a/node_modules/react-native-ui-lib/src/components/segmentedControl/index.tsx ++++ b/node_modules/react-native-ui-lib/src/components/segmentedControl/index.tsx +@@ -7,7 +7,6 @@ import Reanimated, { + useAnimatedStyle, + useSharedValue, + withTiming, +- WithTimingConfig, + runOnJS + } from 'react-native-reanimated'; + import {Colors, BorderRadiuses, Spacings} from '../../style'; +@@ -16,7 +15,7 @@ import View from '../view'; + import Segment, {SegmentedControlItemProps as SegmentProps} from './segment'; + + const BORDER_WIDTH = 1; +-const TIMING_CONFIG: WithTimingConfig = { ++const TIMING_CONFIG = { + duration: 300, + easing: Easing.bezier(0.33, 1, 0.68, 1) + }; diff --git a/node_modules/react-native-ui-lib/src/components/stateScreen/index.tsx b/node_modules/react-native-ui-lib/src/components/stateScreen/index.tsx index 29bf95a..347a78e 100644 --- a/node_modules/react-native-ui-lib/src/components/stateScreen/index.tsx @@ -196,6 +217,18 @@ index 29bf95a..347a78e 100644 export default asBaseComponent(StateScreen); function createStyles(isRemoteImage: boolean) { +diff --git a/node_modules/react-native-ui-lib/src/components/tabController/TabBarItem.tsx b/node_modules/react-native-ui-lib/src/components/tabController/TabBarItem.tsx +index 7bb9245..16440be 100644 +--- a/node_modules/react-native-ui-lib/src/components/tabController/TabBarItem.tsx ++++ b/node_modules/react-native-ui-lib/src/components/tabController/TabBarItem.tsx +@@ -99,6 +99,7 @@ export interface TabControllerItemProps { + interface Props extends TabControllerItemProps { + index: number; + targetPage: any; // TODO: typescript? ++ // @ts-ignore + currentPage: Reanimated.Adaptable; + onLayout?: (event: LayoutChangeEvent, index: number) => void; + } diff --git a/node_modules/react-native-ui-lib/src/components/timeline/index.tsx b/node_modules/react-native-ui-lib/src/components/timeline/index.tsx index 158406a..456f56c 100644 --- a/node_modules/react-native-ui-lib/src/components/timeline/index.tsx @@ -285,6 +318,24 @@ index 0ba2020..0965094 100644 ValidationMessagePosition as TextFieldValidationMessagePosition }; export default asBaseComponent(forwardRef(TextField as any), { +diff --git a/node_modules/react-native-ui-lib/src/incubator/TouchableOpacity.tsx b/node_modules/react-native-ui-lib/src/incubator/TouchableOpacity.tsx +index cb3d69d..5084ec8 100644 +--- a/node_modules/react-native-ui-lib/src/incubator/TouchableOpacity.tsx ++++ b/node_modules/react-native-ui-lib/src/incubator/TouchableOpacity.tsx +@@ -148,13 +148,11 @@ function TouchableOpacity(props: Props) { + + return ( + + +- {/* @ts-expect-error */} + +