From 8efcac3bb6d7ace7dc01e43e4e5ce78de81a1dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Thu, 30 Nov 2023 15:21:17 +0100 Subject: [PATCH 1/2] init --- src/reanimated2/component/ScrollView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/reanimated2/component/ScrollView.tsx b/src/reanimated2/component/ScrollView.tsx index 9d2afcb47e6..1612bd7c840 100644 --- a/src/reanimated2/component/ScrollView.tsx +++ b/src/reanimated2/component/ScrollView.tsx @@ -7,8 +7,10 @@ import { createAnimatedComponent } from '../../createAnimatedComponent'; import type { SharedValue } from '../commonTypes'; import type { AnimatedRef } from '../hook'; import { useAnimatedRef, useScrollViewOffset } from '../hook'; +import type { AnimatedProps } from '../helperTypes'; -export interface AnimatedScrollViewProps extends ScrollViewProps { +export interface AnimatedScrollViewProps + extends AnimatedProps { scrollViewOffset?: SharedValue; } From 22c54af2b823721a36a1894d75ba5e070a424a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Thu, 30 Nov 2023 15:38:51 +0100 Subject: [PATCH 2/2] moar tests --- __typetests__/common.tsx | 69 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/__typetests__/common.tsx b/__typetests__/common.tsx index daa436caebe..81b7450a2f8 100644 --- a/__typetests__/common.tsx +++ b/__typetests__/common.tsx @@ -1951,3 +1951,72 @@ function UseAnimatedRefTest() { ); } } + +function AnimatedPropsTest() { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + function AnimatedPropsTestExistence(prop: any) { + class CustomClassComponent extends React.Component { + render() { + return null; + } + } + const AnimatedCustomClassComponent = + Animated.createAnimatedComponent(CustomClassComponent); + + return ( + <> + + + + + null} + /> + + + ); + } +}