Skip to content

Commit 9b0ed92

Browse files
Amy Huyenfacebook-github-bot
Amy Huyen
authored andcommitted
Export flow type for ScrollView Deceleration Rate
Summary: ## Changelog: [General] [Changed] Export Flow type for deceleration rate for use in other files to keep deceleration rate prop values consistently typed Reviewed By: lunaleaps Differential Revision: D32989199 fbshipit-source-id: 2e2fef0721de0d0eb60aaefdbb635788bfc8c1f1
1 parent 896a5c9 commit 9b0ed92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Libraries/Components/ScrollView/ScrollView.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ export type ScrollViewImperativeMethods = $ReadOnly<{|
161161
>,
162162
|}>;
163163

164+
export type DecelerationRateType = 'fast' | 'normal' | number;
164165
export type ScrollResponderType = ScrollViewImperativeMethods;
165166

166167
type IOSProps = $ReadOnly<{|
@@ -473,7 +474,7 @@ export type Props = $ReadOnly<{|
473474
* - `'normal'`: 0.998 on iOS, 0.985 on Android (the default)
474475
* - `'fast'`: 0.99 on iOS, 0.9 on Android
475476
*/
476-
decelerationRate?: ?('fast' | 'normal' | number),
477+
decelerationRate?: ?DecelerationRateType,
477478
/**
478479
* When true, the scroll view's children are arranged horizontally in a row
479480
* instead of vertically in a column. The default value is false.

0 commit comments

Comments
 (0)