diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 18cbfb2834..a14ab8d760 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -6480,14 +6480,6 @@ export interface ScrollViewPropsIOS { */ contentInsetAdjustmentBehavior?: 'automatic' | 'scrollableAxes' | 'never' | 'always'; - /** - * A floating-point number that determines how quickly the scroll view - * decelerates after the user lifts their finger. Reasonable choices include - * - Normal: 0.998 (the default) - * - Fast: 0.9 - */ - decelerationRate?: 'fast' | 'normal' | number; - /** * When true the ScrollView will try to lock to only vertical or horizontal * scrolling while dragging. The default value is false. @@ -6579,19 +6571,19 @@ export interface ScrollViewPropsIOS { */ scrollsToTop?: boolean; + /** + * When `snapToInterval` is set, `snapToAlignment` will define the relationship of the the snapping to the scroll view. + * - `start` (the default) will align the snap at the left (horizontal) or top (vertical) + * - `center` will align the snap in the center + * - `end` will align the snap at the right (horizontal) or bottom (vertical) + */ + snapToAlignment?: 'start' | 'center' | 'end'; + /** * Fires when the scroll view scrolls to top after the status bar has been tapped * @platform ios */ onScrollToTop?: (event: NativeSyntheticEvent) => void; - /** - * An array of child indices determining which children get docked to the - * top of the screen when scrolling. For example passing - * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the - * top of the scroll view. This property is not supported in conjunction - * with `horizontal={true}`. - */ - stickyHeaderIndices?: number[]; /** * The current scale of the scroll view content. The default value is 1.0. @@ -6669,6 +6661,18 @@ export interface ScrollViewProps extends ViewProps, ScrollViewPropsIOS, ScrollVi */ contentContainerStyle?: StyleProp; + /** + * A floating-point number that determines how quickly the scroll view + * decelerates after the user lifts their finger. You may also use string + * shortcuts `"normal"` and `"fast"` which match the underlying iOS settings + * for `UIScrollViewDecelerationRateNormal` and + * `UIScrollViewDecelerationRateFast` respectively. + * + * - `'normal'`: 0.998 on iOS, 0.985 on Android (the default) + * - `'fast'`: 0.99 on iOS, 0.9 on Android + */ + decelerationRate?: 'fast' | 'normal' | number, + /** * When true the scroll view's children are arranged horizontally in a row * instead of vertically in a column. The default value is false. @@ -6776,14 +6780,6 @@ export interface ScrollViewProps extends ViewProps, ScrollViewPropsIOS, ScrollVi */ refreshControl?: React.ReactElement; - /** - * When `snapToInterval` is set, `snapToAlignment` will define the relationship of the the snapping to the scroll view. - * - `start` (the default) will align the snap at the left (horizontal) or top (vertical) - * - `center` will align the snap in the center - * - `end` will align the snap at the right (horizontal) or bottom (vertical) - */ - snapToAlignment?: 'start' | 'center' | 'end'; - /** * When set, causes the scroll view to stop at multiples of the value of `snapToInterval`. * This can be used for paginating through children that have lengths smaller than the scroll view. @@ -6814,6 +6810,15 @@ export interface ScrollViewProps extends ViewProps, ScrollViewPropsIOS, ScrollVi */ snapToEnd?: boolean; + /** + * An array of child indices determining which children get docked to the + * top of the screen when scrolling. For example passing + * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the + * top of the scroll view. This property is not supported in conjunction + * with `horizontal={true}`. + */ + stickyHeaderIndices?: number[]; + /** * When true, the scroll view stops on the next index (in relation to scroll position at release) * regardless of how fast the gesture is. This can be used for horizontal pagination when the page