From 516ae261716a85c4ef871a794a243e5b5de2ebd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Fri, 10 Oct 2025 10:53:01 +0200 Subject: [PATCH] Avoid deprecated AnimateProps type --- src/components/bottomSheetDebugView/ReText.webx.tsx | 3 ++- src/components/bottomSheetHandle/types.d.ts | 2 +- .../bottomSheetScrollable/BottomSheetFlashList.tsx | 4 ++-- src/components/bottomSheetScrollable/types.d.ts | 10 +++++----- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/components/bottomSheetDebugView/ReText.webx.tsx b/src/components/bottomSheetDebugView/ReText.webx.tsx index f3b7d5c77..db9b483f3 100644 --- a/src/components/bottomSheetDebugView/ReText.webx.tsx +++ b/src/components/bottomSheetDebugView/ReText.webx.tsx @@ -1,6 +1,7 @@ import React, { useRef } from 'react'; import { type TextProps as RNTextProps, TextInput } from 'react-native'; import Animated, { + type AnimatedProps, type SharedValue, useAnimatedReaction, useDerivedValue, @@ -9,7 +10,7 @@ import Animated, { interface TextProps { text: string; value: SharedValue | number; - style?: Animated.AnimateProps['style']; + style?: AnimatedProps['style']; } const AnimatedTextInput = Animated.createAnimatedComponent(TextInput); diff --git a/src/components/bottomSheetHandle/types.d.ts b/src/components/bottomSheetHandle/types.d.ts index 13ad67da8..fe614bb4a 100644 --- a/src/components/bottomSheetHandle/types.d.ts +++ b/src/components/bottomSheetHandle/types.d.ts @@ -1,7 +1,7 @@ import type React from 'react'; import type { View, ViewProps } from 'react-native'; import type { PanGestureHandlerProperties } from 'react-native-gesture-handler'; -import type { AnimateProps, SharedValue } from 'react-native-reanimated'; +import type { AnimatedProps, SharedValue } from 'react-native-reanimated'; import type { useInteractivePanGestureHandlerConfigs } from '../../hooks/useGestureHandler'; import type { BottomSheetVariables, diff --git a/src/components/bottomSheetScrollable/BottomSheetFlashList.tsx b/src/components/bottomSheetScrollable/BottomSheetFlashList.tsx index 1ec11d0cd..f5c1ea20c 100644 --- a/src/components/bottomSheetScrollable/BottomSheetFlashList.tsx +++ b/src/components/bottomSheetScrollable/BottomSheetFlashList.tsx @@ -2,7 +2,7 @@ import type { FlashListProps } from '@shopify/flash-list'; import React, { forwardRef, memo, type Ref, useMemo } from 'react'; import type { ScrollViewProps } from 'react-native'; -import type Animated from 'react-native-reanimated'; +import type { AnimatedProps } from 'react-native-reanimated'; import BottomSheetScrollView from './BottomSheetScrollView'; import type { BottomSheetScrollViewMethods, @@ -19,7 +19,7 @@ try { } catch (_) {} export type BottomSheetFlashListProps = Omit< - Animated.AnimateProps>, + AnimatedProps>, 'decelerationRate' | 'onScroll' | 'scrollEventThrottle' > & BottomSheetScrollableProps & { diff --git a/src/components/bottomSheetScrollable/types.d.ts b/src/components/bottomSheetScrollable/types.d.ts index ad41e7924..695156012 100644 --- a/src/components/bottomSheetScrollable/types.d.ts +++ b/src/components/bottomSheetScrollable/types.d.ts @@ -16,7 +16,7 @@ import type { View, VirtualizedListProps, } from 'react-native'; -import type Animated from 'react-native-reanimated'; +import type { AnimatedProps } from 'react-native-reanimated'; import type { ScrollEventsHandlersHookType } from '../../types'; export interface BottomSheetScrollableProps { @@ -56,7 +56,7 @@ export type ScrollableProps = //#region FlatList export type BottomSheetFlatListProps = Omit< - Animated.AnimateProps>, + AnimatedProps>, 'decelerationRate' | 'onScroll' | 'scrollEventThrottle' > & BottomSheetScrollableProps & { @@ -136,7 +136,7 @@ export interface BottomSheetFlatListMethods { //#region ScrollView export type BottomSheetScrollViewProps = Omit< - Animated.AnimateProps, + AnimatedProps, 'decelerationRate' | 'scrollEventThrottle' > & BottomSheetScrollableProps & { @@ -202,7 +202,7 @@ export interface BottomSheetScrollViewMethods { //#region SectionList export type BottomSheetSectionListProps = Omit< - Animated.AnimateProps>, + AnimatedProps>, 'decelerationRate' | 'scrollEventThrottle' > & BottomSheetScrollableProps & { @@ -245,7 +245,7 @@ export interface BottomSheetSectionListMethods { //#region export type BottomSheetVirtualizedListProps = Omit< - Animated.AnimateProps>, + AnimatedProps>, 'decelerationRate' | 'scrollEventThrottle' > & BottomSheetScrollableProps & {