File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ declare module "react-native-spring-scrollview" {
1515 y : number ;
1616 }
1717
18+ export interface Size {
19+ width :number ;
20+ height :number ;
21+ }
22+
1823 export interface NativeContentOffset {
1924 x ?: Animated . Value ;
2025 y ?: Animated . Value ;
@@ -104,14 +109,14 @@ declare module "react-native-spring-scrollview" {
104109 onMomentumScrollEnd ?: ( ) => any ;
105110 onScroll ?: ( evt : ScrollEvent ) => any ;
106111 onNativeContentOffsetExtract ?: NativeContentOffset ;
107- onSizeChange ?: ( { width : number , height : number } ) => any;
108- onContentSizeChange ?: ( { width : number , height : number } ) => any;
112+ onSizeChange ?: ( size : Size ) => any ;
113+ onContentSizeChange ?: ( size : Size ) => any ;
109114 }
110115 export class SpringScrollView extends React . PureComponent < SpringScrollViewPropType > {
111- scrollTo ( offset : Offset , animated : boolean = true ) : Promise < void > ;
112- scroll ( offset : Offset , animated : boolean = true ) : Promise < void > ;
113- scrollToBegin ( animated : boolean ) : Promise < void > ;
114- scrollToEnd ( animated : boolean = true ) : Promise < void > ;
116+ scrollTo ( offset : Offset , animated ? : boolean ) : Promise < void > ;
117+ scroll ( offset : Offset , animated ? : boolean ) : Promise < void > ;
118+ scrollToBegin ( animated ? : boolean ) : Promise < void > ;
119+ scrollToEnd ( animated ? : boolean ) : Promise < void > ;
115120 endRefresh ( ) : void ;
116121 endLoading ( ) : void ;
117122 }
Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-spring-scrollview" ,
3- "version" : " 2.0.18 " ,
3+ "version" : " 2.0.19 " ,
44 "description" : " An cross-platform (iOS & Android) spring ScrollView" ,
55 "main" : " index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments