mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Merge pull request #14951 from gyzerok/react-native/update
[React Native] Update React Native version and ScrollView typings
This commit is contained in:
45
react-native/index.d.ts
vendored
45
react-native/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-native 0.37
|
||||
// Type definitions for react-native 0.42
|
||||
// Project: https://github.com/facebook/react-native
|
||||
// Definitions by: Needs A Maintainer <https://github.com/DefinitelyTyped>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -5413,11 +5413,6 @@ declare module "react" {
|
||||
*/
|
||||
onScrollAnimationEnd?: () => void
|
||||
|
||||
/**
|
||||
* When false, the content does not scroll. The default value is true
|
||||
*/
|
||||
scrollEnabled?: boolean // true
|
||||
|
||||
/**
|
||||
* This controls how often the scroll event will be fired while scrolling (in events per seconds).
|
||||
* A higher number yields better accuracy for code that is tracking the scroll position,
|
||||
@@ -5452,7 +5447,7 @@ declare module "react" {
|
||||
* This can be used for paginating through children that have lengths smaller than the scroll view.
|
||||
* Used in combination with snapToAlignment.
|
||||
*/
|
||||
snapToInterval?: number
|
||||
snapToInterval?: number[]
|
||||
|
||||
/**
|
||||
* An array of child indices determining which children get docked to the
|
||||
@@ -5489,6 +5484,15 @@ declare module "react" {
|
||||
*/
|
||||
scrollPerfTag?: string
|
||||
|
||||
/**
|
||||
* Used to override default value of overScroll mode.
|
||||
|
||||
* Possible values:
|
||||
* - 'auto' - Default value, allow a user to over-scroll this view only if the content is large enough to meaningfully scroll.
|
||||
* - 'always' - Always allow a user to over-scroll this view.
|
||||
* - 'never' - Never allow a user to over-scroll this view.
|
||||
*/
|
||||
overScrollMode?: 'auto' | 'always' | 'never'
|
||||
}
|
||||
|
||||
export interface ScrollViewProperties extends ViewProperties, ScrollViewPropertiesIOS, ScrollViewPropertiesAndroid, Touchable, React.Props<ScrollViewStatic> {
|
||||
@@ -5524,7 +5528,7 @@ declare module "react" {
|
||||
* and moves in synchrony with the touch; dragging upwards cancels the
|
||||
* dismissal.
|
||||
*/
|
||||
keyboardDismissMode?: string
|
||||
keyboardDismissMode?: 'none' | 'interactive' | 'on-drag'
|
||||
|
||||
/**
|
||||
* When false tapping outside of the focused text input when the keyboard
|
||||
@@ -5532,16 +5536,16 @@ declare module "react" {
|
||||
* taps and the keyboard will not dismiss automatically. The default value
|
||||
* is false.
|
||||
*/
|
||||
keyboardShouldPersistTaps?: boolean
|
||||
|
||||
/**
|
||||
* Called when scrollable content view of the ScrollView changes.
|
||||
* Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight)
|
||||
* It's implemented using onLayout handler attached to the content container which this ScrollView renders.
|
||||
*
|
||||
*/
|
||||
onContentSizeChange?: (w: number, h: number) => void
|
||||
|
||||
keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled'
|
||||
|
||||
/**
|
||||
* Called when scrollable content view of the ScrollView changes.
|
||||
* Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight)
|
||||
* It's implemented using onLayout handler attached to the content container which this ScrollView renders.
|
||||
*
|
||||
*/
|
||||
onContentSizeChange?: (w: number, h: number) => void
|
||||
|
||||
/**
|
||||
* Fires at most once per frame during scrolling.
|
||||
* The frequency of the events can be contolled using the scrollEventThrottle prop.
|
||||
@@ -5575,6 +5579,11 @@ declare module "react" {
|
||||
*/
|
||||
pagingEnabled?: boolean
|
||||
|
||||
/**
|
||||
* When false, the content does not scroll. The default value is true
|
||||
*/
|
||||
scrollEnabled?: boolean // true
|
||||
|
||||
/**
|
||||
* Experimental: When true offscreen child views (whose `overflow` value is
|
||||
* `hidden`) are removed from their native backing superview when offscreen.
|
||||
|
||||
Reference in New Issue
Block a user