File tree 3 files changed +16
-21
lines changed
src/reanimated2/component
3 files changed +16
-21
lines changed Original file line number Diff line number Diff line change 100
100
"@types/babel__generator" : " ^7.6.4" ,
101
101
"@types/babel__traverse" : " ^7.14.2" ,
102
102
"@types/jest" : " ^27.4.0" ,
103
- "@types/react-native" : " ^0.66.15 " ,
103
+ "@types/react-native" : " ^0.69.5 " ,
104
104
"@typescript-eslint/eslint-plugin" : " ^5.11.0" ,
105
105
"@typescript-eslint/parser" : " ^5.11.0" ,
106
106
"babel-eslint" : " ^10.1.0" ,
Original file line number Diff line number Diff line change @@ -6,10 +6,14 @@ import { ILayoutAnimationBuilder } from '../layoutReanimation/animationBuilder/c
6
6
7
7
const AnimatedFlatList = createAnimatedComponent ( FlatList as any ) as any ;
8
8
9
+ interface AnimatedFlatListProps {
10
+ onLayout : ( event : LayoutChangeEvent ) => void ;
11
+ // implicit `children` prop has been removed in @types/react^18.0.0
12
+ children : React . ReactNode ;
13
+ }
14
+
9
15
const createCellRenderer = ( itemLayoutAnimation ?: ILayoutAnimationBuilder ) => {
10
- const cellRenderer : React . FC < {
11
- onLayout : ( event : LayoutChangeEvent ) => void ;
12
- } > = ( props ) => {
16
+ const cellRenderer = ( props : AnimatedFlatListProps ) => {
13
17
return (
14
18
< ReanimatedView layout = { itemLayoutAnimation } onLayout = { props . onLayout } >
15
19
{ props . children }
@@ -20,11 +24,11 @@ const createCellRenderer = (itemLayoutAnimation?: ILayoutAnimationBuilder) => {
20
24
return cellRenderer ;
21
25
} ;
22
26
23
- export interface ReanimatedFlatlistProps < ItemT > extends FlatListProps < ItemT > {
27
+ export interface ReanimatedFlatListProps < ItemT > extends FlatListProps < ItemT > {
24
28
itemLayoutAnimation ?: ILayoutAnimationBuilder ;
25
29
}
26
30
27
- type ReanimatedFlatListFC < T = any > = React . FC < ReanimatedFlatlistProps < T > > ;
31
+ type ReanimatedFlatListFC < T = any > = React . FC < ReanimatedFlatListProps < T > > ;
28
32
29
33
const ReanimatedFlatlist : ReanimatedFlatListFC = forwardRef (
30
34
( props : ReanimatedFlatListProps < any > , ref : ForwardedRef < FlatList > ) => {
Original file line number Diff line number Diff line change 3933
3933
dependencies :
3934
3934
" @types/react" " *"
3935
3935
3936
- " @types/react-native@^0.66.15 " :
3937
- version "0.66.21 "
3938
- resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.66.21 .tgz#0af38b44fb5a4afdc4ef6ecf065ef91ee5bc813f "
3939
- integrity sha512-O/PLXzTWZsNByotNKLxBWe/ePr/qV2km2pXflnMFkaot3KdfMl36E/0c5JVRMKCxxmDVvoazVHkqPuAvnkkgxA ==
3936
+ " @types/react-native@^0.69.5 " :
3937
+ version "0.69.5 "
3938
+ resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.69.5 .tgz#7709fdbff031a5ecf1956705e6c4a07cdfe6867c "
3939
+ integrity sha512-mSUCuGUsW2kJlZiu4GmdYVDKZX/52iyC9rm6dxAmflJj1b7kSO/CMSDy5WbcfS8QerxTqbYGTrIwHD0GnXHzbQ ==
3940
3940
dependencies :
3941
- " @types/react" " ^17 "
3941
+ " @types/react" " * "
3942
3942
3943
3943
" @types/react-test-renderer@>=16.9.0 " :
3944
3944
version "18.0.0"
3965
3965
" @types/scheduler" " *"
3966
3966
csstype "^3.0.2"
3967
3967
3968
- " @types/react@^17 " :
3969
- version "17.0.48"
3970
- resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.48.tgz#a4532a8b91d7b27b8768b6fc0c3bccb760d15a6c"
3971
- integrity sha512-zJ6IYlJ8cYYxiJfUaZOQee4lh99mFihBoqkOSEGV+dFi9leROW6+PgstzQ+w3gWTnUfskALtQPGHK6dYmPj+2A==
3972
- dependencies :
3973
- " @types/prop-types" " *"
3974
- " @types/scheduler" " *"
3975
- csstype "^3.0.2"
3976
-
3977
3968
" @types/responselike@*" , "@types/responselike@^1.0.0":
3978
3969
version "1.0.0"
3979
3970
resolved "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz"
@@ -9935,7 +9926,7 @@ react-test-renderer@18.0.0:
9935
9926
9936
9927
react@17.0.2 :
9937
9928
version "17.0.2"
9938
- resolved "https://registry.npmjs.org /react/-/react-17.0.2.tgz"
9929
+ resolved "https://registry.yarnpkg.com /react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037 "
9939
9930
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
9940
9931
dependencies :
9941
9932
loose-envify "^1.1.0"
You can’t perform that action at this time.
0 commit comments