From 2da42c0cc09cd64d5991cb15125a50fff9cbf58c Mon Sep 17 00:00:00 2001 From: Adam Miskiewicz Date: Wed, 28 Jun 2017 12:30:27 -0700 Subject: [PATCH 01/24] Improved header + tab bar styles on iOS --- src/views/Header.js | 22 +++++++++++++++++----- src/views/TabView/TabBarBottom.js | 11 +++++++---- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/views/Header.js b/src/views/Header.js index e4e3f98..c7a0d89 100644 --- a/src/views/Header.js +++ b/src/views/Header.js @@ -296,11 +296,14 @@ class Header extends React.PureComponent { } } -const styles = StyleSheet.create({ - container: { - paddingTop: STATUSBAR_HEIGHT, - backgroundColor: Platform.OS === 'ios' ? '#EFEFF2' : '#FFF', - height: STATUSBAR_HEIGHT + APPBAR_HEIGHT, +let platformContainerStyles; +if (Platform.OS === 'ios') { + platformContainerStyles = { + borderBottomWidth: StyleSheet.hairlineWidth, + borderBottomColor: 'rgba(0, 0, 0, .3)', + }; +} else { + platformContainerStyles = { shadowColor: 'black', shadowOpacity: 0.1, shadowRadius: StyleSheet.hairlineWidth, @@ -308,6 +311,15 @@ const styles = StyleSheet.create({ height: StyleSheet.hairlineWidth, }, elevation: 4, + }; +} + +const styles = StyleSheet.create({ + container: { + paddingTop: STATUSBAR_HEIGHT, + backgroundColor: Platform.OS === 'ios' ? '#F7F7F7' : '#FFF', + height: STATUSBAR_HEIGHT + APPBAR_HEIGHT, + ...platformContainerStyles, }, appBar: { flex: 1, diff --git a/src/views/TabView/TabBarBottom.js b/src/views/TabView/TabBarBottom.js index 89c59c7..b9b7035 100644 --- a/src/views/TabView/TabBarBottom.js +++ b/src/views/TabView/TabBarBottom.js @@ -39,8 +39,11 @@ type Props = { showIcon: boolean, }; -export default class TabBarBottom - extends PureComponent { +export default class TabBarBottom extends PureComponent< + DefaultProps, + Props, + void +> { // See https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/UIKitUICatalog/UITabBar.html static defaultProps = { activeTintColor: '#3478f6', // Default active tint color in iOS 10 @@ -177,8 +180,8 @@ const styles = StyleSheet.create({ height: 49, // Default tab bar height in iOS 10 flexDirection: 'row', borderTopWidth: StyleSheet.hairlineWidth, - borderTopColor: 'rgba(0, 0, 0, .2)', - backgroundColor: '#f4f4f4', // Default background color in iOS 10 + borderTopColor: 'rgba(0, 0, 0, .3)', + backgroundColor: '#F7F7F7', // Default background color in iOS 10 }, tab: { flex: 1, From 1919bff719908a885610e5005a9a594e473ce7fd Mon Sep 17 00:00:00 2001 From: Adam Miskiewicz Date: Wed, 28 Jun 2017 12:30:49 -0700 Subject: [PATCH 02/24] Disable noisy logging unless process.env.REACT_NAV_LOGGING is set --- src/createNavigationContainer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/createNavigationContainer.js b/src/createNavigationContainer.js index 2aefb6a..3256013 100644 --- a/src/createNavigationContainer.js +++ b/src/createNavigationContainer.js @@ -119,7 +119,8 @@ export default function createNavigationContainer( ) { if ( typeof this.props.onNavigationStateChange === 'undefined' && - this._isStateful() + this._isStateful() && + !!process.env.REACT_NAV_LOGGING ) { /* eslint-disable no-console */ if (console.group) { From 8455b75dbd7913037f9692cc9bacdecf74bd6b01 Mon Sep 17 00:00:00 2001 From: Adam Miskiewicz Date: Wed, 28 Jun 2017 12:31:05 -0700 Subject: [PATCH 03/24] BackAndroid -> BackHandler --- src/PlatformHelpers.js | 2 +- src/PlatformHelpers.native.js | 6 +++--- src/createNavigationContainer.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PlatformHelpers.js b/src/PlatformHelpers.js index e1490cd..e69c1db 100644 --- a/src/PlatformHelpers.js +++ b/src/PlatformHelpers.js @@ -6,6 +6,6 @@ export const Linking = { getInitialURL: () => Promise.reject('Unsupported platform'), }; -export const BackAndroid = { +export const BackHandler = { addEventListener: () => {}, }; diff --git a/src/PlatformHelpers.native.js b/src/PlatformHelpers.native.js index 49818d3..de92679 100644 --- a/src/PlatformHelpers.native.js +++ b/src/PlatformHelpers.native.js @@ -2,10 +2,10 @@ import { BackAndroid as DeprecatedBackAndroid, - BackHandler, + BackHandler as ModernBackHandler, Linking, } from 'react-native'; -const BackAndroid = BackHandler || DeprecatedBackAndroid; +const BackHandler = ModernBackHandler || DeprecatedBackAndroid; -export { BackAndroid, Linking }; +export { BackHandler, Linking }; diff --git a/src/createNavigationContainer.js b/src/createNavigationContainer.js index 3256013..43345be 100644 --- a/src/createNavigationContainer.js +++ b/src/createNavigationContainer.js @@ -2,7 +2,7 @@ import React from 'react'; import invariant from './utils/invariant'; -import { BackAndroid, Linking } from './PlatformHelpers'; +import { BackHandler, Linking } from './PlatformHelpers'; import NavigationActions from './NavigationActions'; import addNavigationHelpers from './addNavigationHelpers'; @@ -154,7 +154,7 @@ export default function createNavigationContainer( return; } - this.subs = BackAndroid.addEventListener('backPress', () => + this.subs = BackHandler.addEventListener('hardwareBackPress', () => this.dispatch(NavigationActions.back()) ); From c209b2dfcce6f85472aca27b33d904e56a6d0c46 Mon Sep 17 00:00:00 2001 From: Adam Miskiewicz Date: Wed, 28 Jun 2017 13:15:03 -0700 Subject: [PATCH 04/24] Add react-native flow-typed definition --- flow-typed/react-native.js | 4383 ++++++++++++++++++++++++++++++++++++ 1 file changed, 4383 insertions(+) create mode 100644 flow-typed/react-native.js diff --git a/flow-typed/react-native.js b/flow-typed/react-native.js new file mode 100644 index 0000000..06d8585 --- /dev/null +++ b/flow-typed/react-native.js @@ -0,0 +1,4383 @@ +declare var __DEV__: boolean; + +declare module 'react-native' { + + declare type Color = string | number; + + declare type Transform = + { perspective: number } | + { scale: number } | + { scaleX: number } | + { scaleY: number } | + { translateX: number } | + { translateY: number } | + { rotate: string } | + { rotateX: string } | + { rotateY: string } | + { rotateZ: string } | + { skewX: string } | + { skewY: string }; + + declare type TransformPropTypes = {| + transform?: Array + |}; + + declare type LayoutPropTypes = {| + /** `display` sets the display type of this component. + * + * It works similarly to `display` in CSS, but only support 'flex' and 'none'. + * 'flex' is the default. + */ + display?: 'flex' | 'none', + + /** `width` sets the width of this component. + * + * It works similarly to `width` in CSS, but in React Native you + * must use points or percentages. Ems and other units are not supported. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/width for more details. + */ + width?: number | string, + + /** `height` sets the height of this component. + * + * It works similarly to `height` in CSS, but in React Native you + * must use points or percentages. Ems and other units are not supported. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/height for more details. + */ + height?: number | string, + + /** `top` is the number of logical pixels to offset the top edge of + * this component. + * + * It works similarly to `top` in CSS, but in React Native you + * must use points or percentages. Ems and other units are not supported. + * + * See https://developer.mozilla.org/en-US/docs/Web/CSS/top + * for more details of how `top` affects layout. + */ + top?: number | string, + + /** `left` is the number of logical pixels to offset the left edge of + * this component. + * + * It works similarly to `left` in CSS, but in React Native you + * must use points or percentages. Ems and other units are not supported. + * + * See https://developer.mozilla.org/en-US/docs/Web/CSS/left + * for more details of how `left` affects layout. + */ + left?: number | string, + + /** `right` is the number of logical pixels to offset the right edge of + * this component. + * + * It works similarly to `right` in CSS, but in React Native you + * must use points or percentages. Ems and other units are not supported. + * + * See https://developer.mozilla.org/en-US/docs/Web/CSS/right + * for more details of how `right` affects layout. + */ + right?: number | string, + + /** `bottom` is the number of logical pixels to offset the bottom edge of + * this component. + * + * It works similarly to `bottom` in CSS, but in React Native you + * must use points or percentages. Ems and other units are not supported. + * + * See https://developer.mozilla.org/en-US/docs/Web/CSS/bottom + * for more details of how `bottom` affects layout. + */ + bottom?: number | string, + + /** `minWidth` is the minimum width for this component, in logical pixels. + * + * It works similarly to `min-width` in CSS, but in React Native you + * must use points or percentages. Ems and other units are not supported. + * + * See https://developer.mozilla.org/en-US/docs/Web/CSS/min-width + * for more details. + */ + minWidth?: number | string, + + /** `maxWidth` is the maximum width for this component, in logical pixels. + * + * It works similarly to `max-width` in CSS, but in React Native you + * must use points or percentages. Ems and other units are not supported. + * + * See https://developer.mozilla.org/en-US/docs/Web/CSS/max-width + * for more details. + */ + maxWidth?: number | string, + + /** `minHeight` is the minimum height for this component, in logical pixels. + * + * It works similarly to `min-height` in CSS, but in React Native you + * must use points or percentages. Ems and other units are not supported. + * + * See https://developer.mozilla.org/en-US/docs/Web/CSS/min-height + * for more details. + */ + minHeight?: number | string, + + /** `maxHeight` is the maximum height for this component, in logical pixels. + * + * It works similarly to `max-height` in CSS, but in React Native you + * must use points or percentages. Ems and other units are not supported. + * + * See https://developer.mozilla.org/en-US/docs/Web/CSS/max-height + * for more details. + */ + maxHeight?: number | string, + + /** Setting `margin` has the same effect as setting each of + * `marginTop`, `marginLeft`, `marginBottom`, and `marginRight`. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin + * for more details. + */ + margin?: number | string, + + /** Setting `marginVertical` has the same effect as setting both + * `marginTop` and `marginBottom`. + */ + marginVertical?: number | string, + + /** Setting `marginHorizontal` has the same effect as setting + * both `marginLeft` and `marginRight`. + */ + marginHorizontal?: number | string, + + /** `marginTop` works like `margin-top` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top + * for more details. + */ + marginTop?: number | string, + + /** `marginBottom` works like `margin-bottom` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom + * for more details. + */ + marginBottom?: number | string, + + /** `marginLeft` works like `margin-left` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left + * for more details. + */ + marginLeft?: number | string, + + /** `marginRight` works like `margin-right` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right + * for more details. + */ + marginRight?: number | string, + + /** Setting `padding` has the same effect as setting each of + * `paddingTop`, `paddingBottom`, `paddingLeft`, and `paddingRight`. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding + * for more details. + */ + padding?: number | string, + + /** Setting `paddingVertical` is like setting both of + * `paddingTop` and `paddingBottom`. + */ + paddingVertical?: number | string, + + /** Setting `paddingHorizontal` is like setting both of + * `paddingLeft` and `paddingRight`. + */ + paddingHorizontal?: number | string, + + /** `paddingTop` works like `padding-top` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top + * for more details. + */ + paddingTop?: number | string, + + /** `paddingBottom` works like `padding-bottom` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom + * for more details. + */ + paddingBottom?: number | string, + + /** `paddingLeft` works like `padding-left` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left + * for more details. + */ + paddingLeft?: number | string, + + /** `paddingRight` works like `padding-right` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right + * for more details. + */ + paddingRight?: number | string, + + /** `borderWidth` works like `border-width` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-width + * for more details. + */ + borderWidth?: number, + + /** `borderTopWidth` works like `border-top-width` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-width + * for more details. + */ + borderTopWidth?: number, + + /** `borderRightWidth` works like `border-right-width` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-width + * for more details. + */ + borderRightWidth?: number, + + /** `borderBottomWidth` works like `border-bottom-width` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-width + * for more details. + */ + borderBottomWidth?: number, + + /** `borderLeftWidth` works like `border-left-width` in CSS. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-width + * for more details. + */ + borderLeftWidth?: number, + + /** `position` in React Native is similar to regular CSS, but + * everything is set to `relative` by default, so `absolute` + * positioning is always just relative to the parent. + * + * If you want to position a child using specific numbers of logical + * pixels relative to its parent, set the child to have `absolute` + * position. + * + * If you want to position a child relative to something + * that is not its parent, just don't use styles for that. Use the + * component tree. + * + * See https://github.com/facebook/yoga + * for more details on how `position` differs between React Native + * and CSS. + */ + position?: 'absolute' | 'relative', + + /** `flexDirection` controls which directions children of a container go. + * `row` goes left to right, `column` goes top to bottom, and you may + * be able to guess what the other two do. It works like `flex-direction` + * in CSS, except the default is `column`. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction + * for more details. + */ + flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse', + + /** `flexWrap` controls whether children can wrap around after they + * hit the end of a flex container. + * It works like `flex-wrap` in CSS (default: nowrap). + * See https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap + * for more details. + */ + flexWrap?: 'wrap' | 'nowrap', + + /** `justifyContent` aligns children in the main direction. + * For example, if children are flowing vertically, `justifyContent` + * controls how they align vertically. + * It works like `justify-content` in CSS (default: flex-start). + * See https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content + * for more details. + */ + justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around', + + /** `alignItems` aligns children in the cross direction. + * For example, if children are flowing vertically, `alignItems` + * controls how they align horizontally. + * It works like `align-items` in CSS (default: stretch). + * See https://developer.mozilla.org/en-US/docs/Web/CSS/align-items + * for more details. + */ + alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline', + + /** `alignSelf` controls how a child aligns in the cross direction, + * overriding the `alignItems` of the parent. It works like `align-self` + * in CSS (default: auto). + * See https://developer.mozilla.org/en-US/docs/Web/CSS/align-self + * for more details. + */ + alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline', + + /** `alignContent` controls how rows align in the cross direction, + * overriding the `alignContent` of the parent. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/align-content + * for more details. + */ + alignContent?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'space-between' | 'space-around', + + /** `overflow` controls how a children are measured and displayed. + * `overflow: hidden` causes views to be clipped while `overflow: scroll` + * causes views to be measured independently of their parents main axis.` + * It works like `overflow` in CSS (default: visible). + * See https://developer.mozilla.org/en/docs/Web/CSS/overflow + * for more details. + */ + overflow?: 'visible' | 'hidden' | 'scroll', + + /** In React Native `flex` does not work the same way that it does in CSS. + * `flex` is a number rather than a string, and it works + * according to the `Yoga` library + * at https://github.com/facebook/yoga + * + * When `flex` is a positive number, it makes the component flexible + * and it will be sized proportional to its flex value. So a + * component with `flex` set to 2 will take twice the space as a + * component with `flex` set to 1. + * + * When `flex` is 0, the component is sized according to `width` + * and `height` and it is inflexible. + * + * When `flex` is -1, the component is normally sized according + * `width` and `height`. However, if there's not enough space, + * the component will shrink to its `minWidth` and `minHeight`. + * + * flexGrow, flexShrink, and flexBasis work the same as in CSS. + */ + flex?: number, + flexGrow?: number, + flexShrink?: number, + flexBasis?: number | string, + + /** + * Aspect ratio control the size of the undefined dimension of a node. Aspect ratio is a + * non-standard property only available in react native and not CSS. + * + * - On a node with a set width/height aspect ratio control the size of the unset dimension + * - On a node with a set flex basis aspect ratio controls the size of the node in the cross axis + * if unset + * - On a node with a measure function aspect ratio works as though the measure function measures + * the flex basis + * - On a node with flex grow/shrink aspect ratio controls the size of the node in the cross axis + * if unset + * - Aspect ratio takes min/max dimensions into account + */ + aspectRatio?: number, + + /** `zIndex` controls which components display on top of others. + * Normally, you don't use `zIndex`. Components render according to + * their order in the document tree, so later components draw over + * earlier ones. `zIndex` may be useful if you have animations or custom + * modal interfaces where you don't want this behavior. + * + * It works like the CSS `z-index` property - components with a larger + * `zIndex` will render on top. Think of the z-direction like it's + * pointing from the phone into your eyeball. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/z-index for + * more details. + */ + zIndex?: number, + + /** `direction` specifies the directional flow of the user interface. + * The default is `inherit`, except for root node which will have + * value based on the current locale. + * See https://facebook.github.io/yoga/docs/rtl/ + * for more details. + * @platform ios + */ + direction?: 'inherit' | 'ltr' | 'rtl', + |}; + + declare type ShadowPropTypes = {| + /** + * Sets the drop shadow color + * @platform ios + */ + shadowColor?: Color, + + /** + * Sets the drop shadow offset + * @platform ios + */ + shadowOffset?: {| + width?: number, + height?: number + |}, + + /** + * Sets the drop shadow opacity (multiplied by the color's alpha component) + * @platform ios + */ + shadowOpacity?: number, + + /** + * Sets the drop shadow blur radius + * @platform ios + */ + shadowRadius?: number, + |}; + + declare type ExtraViewStylePropTypes = {| + backfaceVisibility?: 'visible' | 'hidden', + backgroundColor?: Color, + borderColor?: Color, + borderTopColor?: Color, + borderRightColor?: Color, + borderBottomColor?: Color, + borderLeftColor?: Color, + borderRadius?: number, + borderTopLeftRadius?: number, + borderTopRightRadius?: number, + borderBottomLeftRadius?: number, + borderBottomRightRadius?: number, + borderStyle?: 'solid' | 'dotted' | 'dashed', + borderWidth?: number, + borderTopWidth?: number, + borderRightWidth?: number, + borderBottomWidth?: number, + borderLeftWidth?: number, + opacity?: number, + /** + * (Android-only) Sets the elevation of a view, using Android's underlying + * [elevation API](https://developer.android.com/training/material/shadows-clipping.html#Elevation). + * This adds a drop shadow to the item and affects z-order for overlapping views. + * Only supported on Android 5.0+, has no effect on earlier versions. + * @platform android + */ + elevation?: number, + |}; + + declare type FontVariant = 'small-caps' | + 'oldstyle-nums' | + 'lining-nums' | + 'tabular-nums' | + 'proportional-nums'; + + declare type ExtraTextStylePropTypes = {| + color?: Color, + fontFamily?: string, + fontSize?: number, + fontStyle?: 'normal' | 'italic', + /** + * Specifies font weight. The values 'normal' and 'bold' are supported for + * most fonts. Not all fonts have a variant for each of the numeric values, + * in that case the closest one is chosen. + */ + fontWeight?: + 'normal' | 'bold' | + '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900', + /** + * @platform ios + */ + fontVariant?: Array, + textShadowOffset?: {| + width?: number, + height?: number + |}, + textShadowRadius?: number, + textShadowColor?: Color, + /** + * @platform ios + */ + letterSpacing?: number, + lineHeight?: number, + /** + * Specifies text alignment. The value 'justify' is only supported on iOS and + * fallbacks to `left` on Android. + */ + textAlign?: 'auto' | 'left' | 'right' | 'center' | 'justify', + /** + * @platform android + */ + textAlignVertical?: 'auto' | 'top' | 'bottom' | 'center', + /** + * Set to `false` to remove extra font padding intended to make space for certain ascenders / descenders. + * With some fonts, this padding can make text look slightly misaligned when centered vertically. + * For best results also set `textAlignVertical` to `center`. Default is true. + * @platform android + */ + includeFontPadding?: boolean, + textDecorationLine?: 'none' | 'underline' | 'line-through' | 'underline line-through', + /** + * @platform ios + */ + textDecorationStyle?: 'solid' | 'double' | 'dotted' | 'dashed', + /** + * @platform ios + */ + textDecorationColor?: Color, + /** + * @platform ios + */ + writingDirection?: 'auto' | 'ltr' | 'rtl', + |}; + + declare type ImageResizeModeEnum = { + contain: 'contain', + cover: 'cover', + stretch: 'stretch', + center: 'center', + repeat: 'repeat', + }; + + declare type ExtraImageStylePropTypes = {| + resizeMode?: $Keys, + backfaceVisibility?: 'visible' | 'hidden', + backgroundColor?: Color, + borderColor?: Color, + borderWidth?: number, + borderRadius?: number, + overflow?: 'visible' | 'hidden', + + /** + * Changes the color of all the non-transparent pixels to the tintColor. + */ + tintColor?: Color, + opacity?: number, + /** + * When the image has rounded corners, specifying an overlayColor will + * cause the remaining space in the corners to be filled with a solid color. + * This is useful in cases which are not supported by the Android + * implementation of rounded corners: + * - Certain resize modes, such as 'contain' + * - Animated GIFs + * + * A typical way to use this prop is with images displayed on a solid + * background and setting the `overlayColor` to the same color + * as the background. + * + * For details of how this works under the hood, see + * http://frescolib.org/docs/rounded-corners-and-circles.html + * + * @platform android + */ + overlayColor?: string, + + // Android-Specific styles + borderTopLeftRadius?: number, + borderTopRightRadius?: number, + borderBottomLeftRadius?: number, + borderBottomRightRadius?: number, + |}; + + + declare type ViewStylePropTypes = {| + ...LayoutPropTypes, + ...ShadowPropTypes, + ...TransformPropTypes, + ...ExtraViewStylePropTypes, + |}; + + declare type TextStylePropTypes = {| + ...LayoutPropTypes, + ...ShadowPropTypes, + ...TransformPropTypes, + ...ExtraViewStylePropTypes, + ...ExtraTextStylePropTypes, + |}; + + declare type ImageStylePropTypes = {| + ...LayoutPropTypes, + ...ShadowPropTypes, + ...TransformPropTypes, + ...ExtraImageStylePropTypes, + |}; + + declare type StylePropTypes = {| + ...LayoutPropTypes, + ...ShadowPropTypes, + ...TransformPropTypes, + ...ExtraImageStylePropTypes, + ...ExtraTextStylePropTypes, + ...ExtraViewStylePropTypes, + |} + + declare type StyleId = number; + + declare type Styles = {[key: string]: StylePropTypes}; + declare type StyleRuleSet = {[key: $Keys]: StyleId}; + declare type StyleProp = false | null | void | T | V | Array>; + + declare export var StyleSheet: {| + hairlineWidth: number, + absoluteFill: StyleId, + absoluteFillObject: Object, + flatten: (style: StyleProp) => StylePropTypes, + create(styles: S): StyleRuleSet, + setStyleAttributePreprocessor(property: string, process: (nextProp: mixed) => mixed): void, + |}; + + declare type EdgeInsetsProp = { + top: number, + left: number, + bottom: number, + right: number, + }; + + declare type AccessibilityTrait = + 'none' | + 'button' | + 'link' | + 'header' | + 'search' | + 'image' | + 'selected' | + 'plays' | + 'key' | + 'text' | + 'summary' | + 'disabled' | + 'frequentUpdates' | + 'startsMedia' | + 'adjustable' | + 'allowsDirectInteraction' | + 'pageTurn'; + + declare type AccessibilityComponentType = + 'none' | + 'button' | + 'radiobutton_checked' | + 'radiobutton_unchecked'; + + declare type MeasureOnSuccessCallback = ( + x: number, + y: number, + width: number, + height: number, + pageX: number, + pageY: number, + ) => void; + + declare type MeasureInWindowOnSuccessCallback = ( + x: number, + y: number, + width: number, + height: number, + ) => void; + + declare type MeasureLayoutOnSuccessCallback = ( + left: number, + top: number, + width: number, + height: number, + ) => void; + + declare type NativeMethodsMixinType = { + blur(): void, + focus(): void, + measure(callback: MeasureOnSuccessCallback): void, + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void, + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail: () => void, + ): void, + setNativeProps(nativeProps: Object): void, + }; + + declare type ViewDefaultProps = { + }; + + declare type ViewProps = { + accessible?: boolean, + accessibilityLabel?: React$PropType$Primitive, + accessibilityComponentType?: AccessibilityComponentType, + accessibilityLiveRegion?: 'none' | 'polite' | 'assertive', + importantForAccessibility?: 'auto'| 'yes'| 'no'| 'no-hide-descendants', + accessibilityTraits?: AccessibilityTrait | Array, + accessibilityViewIsModal?: boolean, + onAccessibilityTap?: Function, + onMagicTap?: Function, + testID?: string, + nativeID?: string, + onResponderGrant?: Function, + onResponderMove?: Function, + onResponderReject?: Function, + onResponderRelease?: Function, + onResponderTerminate?: Function, + onResponderTerminationRequest?: Function, + onStartShouldSetResponder?: Function, + onStartShouldSetResponderCapture?: Function, + onMoveShouldSetResponder?: Function, + onMoveShouldSetResponderCapture?: Function, + hitSlop?: EdgeInsetsProp, + pointerEvents?: 'box-none'| 'none'| 'box-only'| 'auto', + style?: StyleProp, + removeClippedSubviews?: boolean, + renderToHardwareTextureAndroid?: boolean, + shouldRasterizeIOS?: boolean, + collapsable?: boolean, + needsOffscreenAlphaCompositing?: boolean, + children?: React$Element<*>, + }; + + declare export class View extends React$Component { + blur(): void, + focus(): void, + measure(callback: MeasureOnSuccessCallback): void, + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void, + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail: () => void, + ): void, + setNativeProps(nativeProps: ViewProps): void, + } + + declare type TextDefaultProps = { + accessible: true, + allowFontScaling: true, + ellipsizeMode: 'tail', + disabled: false, + }; + + declare type TextProps = { + /** + * When `numberOfLines` is set, this prop defines how text will be truncated. + * `numberOfLines` must be set in conjunction with this prop. + * + * This can be one of the following values: + * + * - `head` - The line is displayed so that the end fits in the container and the missing text + * at the beginning of the line is indicated by an ellipsis glyph. e.g., "...wxyz" + * - `middle` - The line is displayed so that the beginning and end fit in the container and the + * missing text in the middle is indicated by an ellipsis glyph. "ab...yz" + * - `tail` - The line is displayed so that the beginning fits in the container and the + * missing text at the end of the line is indicated by an ellipsis glyph. e.g., "abcd..." + * - `clip` - Lines are not drawn past the edge of the text container. + * + * The default is `tail`. + * + * > `clip` is working only for iOS + */ + ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip', + /** + * Used to truncate the text with an ellipsis after computing the text + * layout, including line wrapping, such that the total number of lines + * does not exceed this number. + * + * This prop is commonly used with `ellipsizeMode`. + */ + numberOfLines?: number, + /** + * Set text break strategy on Android API Level 23+, possible values are `simple`, `highQuality`, `balanced` + * The default value is `highQuality`. + * @platform android + */ + textBreakStrategy?: 'simple' | 'highQuality' | 'balanced', + /** + * Invoked on mount and layout changes with + * + * `{nativeEvent: {layout: {x, y, width, height}}}` + */ + onLayout?: Function, + /** + * This function is called on press. + * + * e.g., `onPress={() => console.log('1st')}` + */ + onPress?: Function, + /** + * This function is called on long press. + * + * e.g., `onLongPress={this.increaseSize}>` + */ + onLongPress?: Function, + /** + * When the scroll view is disabled, this defines how far your touch may + * move off of the button, before deactivating the button. Once deactivated, + * try moving it back and you'll see that the button is once again + * reactivated! Move it back and forth several times while the scroll view + * is disabled. Ensure you pass in a constant to reduce memory allocations. + */ + pressRetentionOffset?: EdgeInsetsProp, + /** + * Lets the user select text, to use the native copy and paste functionality. + */ + selectable?: boolean, + /** + * The highlight color of the text. + * @platform android + */ + selectionColor?: Color, + /** + * When `true`, no visual change is made when text is pressed down. By + * default, a gray oval highlights the text on press down. + * @platform ios + */ + suppressHighlighting?: boolean, + /** + * Used to locate this view in end-to-end tests. + */ + testID?: string, + /** + * Used to locate this view from native code. + * @platform android + */ + nativeID?: string, + /** + * Specifies whether fonts should scale to respect Text Size accessibility settings. The + * default is `true`. + */ + allowFontScaling?: boolean, + /** + * When set to `true`, indicates that the view is an accessibility element. The default value + * for a `Text` element is `true`. + * + * See the + * [Accessibility guide](docs/accessibility.html#accessible-ios-android) + * for more information. + */ + accessible?: boolean, + /** + * Specifies whether font should be scaled down automatically to fit given style constraints. + * @platform ios + */ + adjustsFontSizeToFit?: boolean, + /** + * Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0). + * @platform ios + */ + minimumFontScale?: number, + /** + * Specifies the disabled state of the text view for testing purposes + * @platform android + */ + disabled?: boolean, + style?: StyleProp, + children?: React$Element<*>, + }; + + declare export class Text extends React$Component { + blur(): void, + focus(): void, + measure(callback: MeasureOnSuccessCallback): void, + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void, + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail: () => void, + ): void, + setNativeProps(nativeProps: TextProps): void, + } + + declare type ImageUriSourcePropType = { + uri: string, + width?: number, + height?: number, + scale?: number, + /** + * `bundle` is the iOS asset bundle which the image is included in. This + * will default to [NSBundle mainBundle] if not set. + * @platform ios + */ + bundle?: string, + /** + * `method` is the HTTP Method to use. Defaults to GET if not specified. + */ + method?: string, + /** + * `headers` is an object representing the HTTP headers to send along with the + * request for a remote image. + */ + headers?: { [key: string]: string }, + /** + * `body` is the HTTP body to send with the request. This must be a valid + * UTF-8 string, and will be sent exactly as specified, with no + * additional encoding (e.g. URL-escaping or base64) applied. + */ + body?: string, + /** + * `cache` determines how the requests handles potentially cached + * responses. + * + * - `default`: Use the native platforms default strategy. `useProtocolCachePolicy` on iOS. + * + * - `reload`: The data for the URL will be loaded from the originating source. + * No existing cache data should be used to satisfy a URL load request. + * + * - `force-cache`: The existing cached data will be used to satisfy the request, + * regardless of its age or expiration date. If there is no existing data in the cache + * corresponding the request, the data is loaded from the originating source. + * + * - `only-if-cached`: The existing cache data will be used to satisfy a request, regardless of + * its age or expiration date. If there is no existing data in the cache corresponding + * to a URL load request, no attempt is made to load the data from the originating source, + * and the load is considered to have failed. + * + * @platform ios + */ + cache?: 'default' | 'reload' | 'force-cache' | 'only-if-cached', + }; + + declare type ImageSourcePropType = ImageUriSourcePropType | number | Array; + + declare type ImageProps = { + /** + * > `ImageResizeMode` is an `Enum` for different image resizing modes, set via the + * > `resizeMode` style property on `Image` components. The values are `contain`, `cover`, + * > `stretch`, `center`, `repeat`. + */ + style?: StyleProp, + /** + * The image source (either a remote URL or a local file resource). + * + * This prop can also contain several remote URLs, specified together with + * their width and height and potentially with scale/other URI arguments. + * The native side will then choose the best `uri` to display based on the + * measured size of the image container. A `cache` property can be added to + * control how networked request interacts with the local cache. + * + * The currently supported formats are `png`, `jpg`, `jpeg`, `bmp`, `gif`, + * `webp` (Android only), `psd` (iOS only). + */ + source?: ImageSourcePropType, + /** + * A static image to display while loading the image source. + * + * - `uri` - a string representing the resource identifier for the image, which + * should be either a local file path or the name of a static image resource + * (which should be wrapped in the `require('./path/to/image.png')` function). + * - `width`, `height` - can be specified if known at build time, in which case + * these will be used to set the default `` component dimensions. + * - `scale` - used to indicate the scale factor of the image. Defaults to 1.0 if + * unspecified, meaning that one image pixel equates to one display point / DIP. + * - `number` - Opaque type returned by something like `require('./image.jpg')`. + * + * @platform ios + */ + defaultSource?: ImageSourcePropType, + /** + * When true, indicates the image is an accessibility element. + * @platform ios + */ + accessible?: boolean, + /** + * The text that's read by the screen reader when the user interacts with + * the image. + * @platform ios + */ + accessibilityLabel?: React$PropType$Primitive, + /** + * blurRadius: the blur radius of the blur filter added to the image + */ + blurRadius?: number, + /** + * When the image is resized, the corners of the size specified + * by `capInsets` will stay a fixed size, but the center content and borders + * of the image will be stretched. This is useful for creating resizable + * rounded buttons, shadows, and other resizable assets. More info in the + * [official Apple documentation](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImage_Class/index.html#//apple_ref/occ/instm/UIImage/resizableImageWithCapInsets). + * + * @platform ios + */ + capInsets?: EdgeInsetsPropType, + /** + * The mechanism that should be used to resize the image when the image's dimensions + * differ from the image view's dimensions. Defaults to `auto`. + * + * - `auto`: Use heuristics to pick between `resize` and `scale`. + * + * - `resize`: A software operation which changes the encoded image in memory before it + * gets decoded. This should be used instead of `scale` when the image is much larger + * than the view. + * + * - `scale`: The image gets drawn downscaled or upscaled. Compared to `resize`, `scale` is + * faster (usually hardware accelerated) and produces higher quality images. This + * should be used if the image is smaller than the view. It should also be used if the + * image is slightly bigger than the view. + * + * More details about `resize` and `scale` can be found at http://frescolib.org/docs/resizing-rotating.html. + * + * @platform android + */ + resizeMethod?: 'auto' | 'resize' | 'scale', + /** + * Determines how to resize the image when the frame doesn't match the raw + * image dimensions. + * + * - `cover`: Scale the image uniformly (maintain the image's aspect ratio) + * so that both dimensions (width and height) of the image will be equal + * to or larger than the corresponding dimension of the view (minus padding). + * + * - `contain`: Scale the image uniformly (maintain the image's aspect ratio) + * so that both dimensions (width and height) of the image will be equal to + * or less than the corresponding dimension of the view (minus padding). + * + * - `stretch`: Scale width and height independently, This may change the + * aspect ratio of the src. + * + * - `repeat`: Repeat the image to cover the frame of the view. The + * image will keep it's size and aspect ratio. (iOS only) + */ + resizeMode?: $Keys, + /** + * A unique identifier for this element to be used in UI Automation + * testing scripts. + */ + testID?: string, + /** + * Invoked on mount and layout changes with + * `{nativeEvent: {layout: {x, y, width, height}}}`. + */ + onLayout?: Function, + /** + * Invoked on load start. + * + * e.g., `onLoadStart={(e) => this.setState({loading: true})}` + */ + onLoadStart?: Function, + /** + * Invoked on download progress with `{nativeEvent: {loaded, total}}`. + * @platform ios + */ + onProgress?: Function, + /** + * Invoked on load error with `{nativeEvent: {error}}`. + */ + onError?: Function, + /** + * Invoked when a partial load of the image is complete. The definition of + * what constitutes a "partial load" is loader specific though this is meant + * for progressive JPEG loads. + * @platform ios + */ + onPartialLoad?: Function, + /** + * Invoked when load completes successfully. + */ + onLoad?: Function, + /** + * Invoked when load either succeeds or fails. + */ + onLoadEnd?: Function, + children?: React$Element<*>, + } + + declare type ResolvedAssetSource = { + __packager_asset: boolean, + width: ?number, + height: ?number, + uri: string, + scale: number, + }; + + declare export class Image extends React$Component { + static resizeMode: ImageResizeModeEnum, + /** + * Retrieve the width and height (in pixels) of an image prior to displaying it. + * This method can fail if the image cannot be found, or fails to download. + * + * In order to retrieve the image dimensions, the image may first need to be + * loaded or downloaded, after which it will be cached. This means that in + * principle you could use this method to preload images, however it is not + * optimized for that purpose, and may in future be implemented in a way that + * does not fully load/download the image data. A proper, supported way to + * preload images will be provided as a separate API. + * + * Does not work for static image resources. + * + * @param uri The location of the image. + * @param success The function that will be called if the image was successfully found and width + * and height retrieved. + * @param failure The function that will be called if there was an error, such as failing to + * to retrieve the image. + * + * @returns void + * + * @platform ios + */ + static getSize( + uri: string, + success: (width: number, height: number) => void, + failure?: (error: any) => void, + ): void, + + /** + * Prefetches a remote image for later use by downloading it to the disk + * cache + * + * @param url The remote location of the image. + * + * @return The prefetched image. + */ + static prefetch(url: string): Promise, + + /** + * Resolves an asset reference into an object which has the properties `uri`, `width`, + * and `height`. The input may either be a number (opaque type returned by + * require('./foo.png')) or an `ImageSource` like { uri: '' } + */ + static resolveAssetSource(source: ImageSourcePropType): ?ResolvedAssetSource, + + blur(): void, + focus(): void, + measure(callback: MeasureOnSuccessCallback): void, + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void, + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail: () => void, + ): void, + setNativeProps(nativeProps: ImageProps): void, + } + + + declare type ScrollViewProps = { + ...ViewProps, + /** + * Controls whether iOS should automatically adjust the content inset + * for scroll views that are placed behind a navigation bar or + * tab bar/ toolbar. The default value is true. + * @platform ios + */ + automaticallyAdjustContentInsets?: boolean, + /** + * The amount by which the scroll view content is inset from the edges + * of the scroll view. Defaults to `{top: 0, left: 0, bottom: 0, right: 0}`. + * @platform ios + */ + contentInset?: EdgeInsetsPropType, + /** + * Used to manually set the starting scroll offset. + * The default value is `{x: 0, y: 0}`. + * @platform ios + */ + contentOffset?: PointPropType, + /** + * When true, the scroll view bounces when it reaches the end of the + * content if the content is larger then the scroll view along the axis of + * the scroll direction. When false, it disables all bouncing even if + * the `alwaysBounce*` props are true. The default value is true. + * @platform ios + */ + bounces?: boolean, + /** + * When true, gestures can drive zoom past min/max and the zoom will animate + * to the min/max value at gesture end, otherwise the zoom will not exceed + * the limits. + * @platform ios + */ + bouncesZoom?: boolean, + /** + * When true, the scroll view bounces horizontally when it reaches the end + * even if the content is smaller than the scroll view itself. The default + * value is true when `horizontal={true}` and false otherwise. + * @platform ios + */ + alwaysBounceHorizontal?: boolean, + /** + * When true, the scroll view bounces vertically when it reaches the end + * even if the content is smaller than the scroll view itself. The default + * value is false when `horizontal={true}` and true otherwise. + * @platform ios + */ + alwaysBounceVertical?: boolean, + /** + * When true, the scroll view automatically centers the content when the + * content is smaller than the scroll view bounds; when the content is + * larger than the scroll view, this property has no effect. The default + * value is false. + * @platform ios + */ + centerContent?: boolean, + /** + * These styles will be applied to the scroll view content container which + * wraps all of the child views. Example: + * + * ``` + * return ( + * + * + * ); + * ... + * const styles = StyleSheet.create({ + * contentContainer: { + * paddingVertical: 20 + * } + * }); + * ``` + */ + 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 (the default) + * - `'fast'`: 0.99 + * + * @platform ios + */ + 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. + */ + horizontal?: boolean, + /** + * The style of the scroll indicators. + * + * - `'default'` (the default), same as `black`. + * - `'black'`, scroll indicator is black. This style is good against a light background. + * - `'white'`, scroll indicator is white. This style is good against a dark background. + * + * @platform ios + */ + indicatorStyle?: 'default' | 'black' | 'white', + /** + * When true, the ScrollView will try to lock to only vertical or horizontal + * scrolling while dragging. The default value is false. + * @platform ios + */ + directionalLockEnabled?: boolean, + /** + * When false, once tracking starts, won't try to drag if the touch moves. + * The default value is true. + * @platform ios + */ + canCancelContentTouches?: boolean, + /** + * Determines whether the keyboard gets dismissed in response to a drag. + * + * - `'none'` (the default), drags do not dismiss the keyboard. + * - `'on-drag'`, the keyboard is dismissed when a drag begins. + * - `'interactive'`, the keyboard is dismissed interactively with the drag and moves in + * synchrony with the touch; dragging upwards cancels the dismissal. + * On android this is not supported and it will have the same behavior as 'none'. + */ + keyboardDismissMode?: 'none' | 'interactive' | 'on-drag', + /** + * Determines when the keyboard should stay visible after a tap. + * + * - `'never'` (the default), tapping outside of the focused text input when the keyboard + * is up dismisses the keyboard. When this happens, children won't receive the tap. + * - `'always'`, the keyboard will not dismiss automatically, and the scroll view will not + * catch taps, but children of the scroll view can catch taps. + * - `'handled'`, the keyboard will not dismiss automatically when the tap was handled by + * a children, (or captured by an ancestor). + * - `false`, deprecated, use 'never' instead + * - `true`, deprecated, use 'always' instead + */ + keyboardShouldPersistTaps?: 'always' | 'never' | 'handled' | false | true, + /** + * The maximum allowed zoom scale. The default value is 1.0. + * @platform ios + */ + maximumZoomScale?: number, + /** + * The minimum allowed zoom scale. The default value is 1.0. + * @platform ios + */ + minimumZoomScale?: number, + /** + * Fires at most once per frame during scrolling. The frequency of the + * events can be controlled using the `scrollEventThrottle` prop. + */ + onScroll?: Function, + /** + * Called when a scrolling animation ends. + * @platform ios + */ + onScrollAnimationEnd?: Function, + /** + * 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?: Function, + /** + * When true, the scroll view stops on multiples of the scroll view's size + * when scrolling. This can be used for horizontal pagination. The default + * value is false. + */ + pagingEnabled?: boolean, + /** + * When false, the view cannot be scrolled via touch interaction. + * The default value is true. + * + * Note that the view can be always be scrolled by calling `scrollTo`. + */ + scrollEnabled?: boolean, + /** + * This controls how often the scroll event will be fired while scrolling + * (as a time interval in ms). A lower number yields better accuracy for code + * that is tracking the scroll position, but can lead to scroll performance + * problems due to the volume of information being send over the bridge. + * You will not notice a difference between values set between 1-16 as the + * JS run loop is synced to the screen refresh rate. If you do not need precise + * scroll position tracking, set this value higher to limit the information + * being sent across the bridge. The default value is zero, which results in + * the scroll event being sent only once each time the view is scrolled. + * @platform ios + */ + scrollEventThrottle?: number, + /** + * The amount by which the scroll view indicators are inset from the edges + * of the scroll view. This should normally be set to the same value as + * the `contentInset`. Defaults to `{0, 0, 0, 0}`. + * @platform ios + */ + scrollIndicatorInsets?: EdgeInsetsPropType, + /** + * When true, the scroll view scrolls to top when the status bar is tapped. + * The default value is true. + * @platform ios + */ + scrollsToTop?: boolean, + /** + * When true, shows a horizontal scroll indicator. + * The default value is true. + */ + showsHorizontalScrollIndicator?: boolean, + /** + * When true, shows a vertical scroll indicator. + * The default value is true. + */ + showsVerticalScrollIndicator?: 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?: Array, + /** + * 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. Used in combination + * with `snapToAlignment`. + * @platform ios + */ + snapToInterval?: number, + /** + * When `snapToInterval` is set, `snapToAlignment` will define the relationship + * of 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) + * + * @platform ios + */ + snapToAlignment?: 'start' | 'center' | 'end', + /** + * Experimental: When true, offscreen child views (whose `overflow` value is + * `hidden`) are removed from their native backing superview when offscreen. + * This can improve scrolling performance on long lists. The default value is + * true. + */ + removeClippedSubviews?: boolean, + /** + * The current scale of the scroll view content. The default value is 1.0. + * @platform ios + */ + zoomScale?: number, + + /** + * A RefreshControl component, used to provide pull-to-refresh + * functionality for the ScrollView. Only works for vertical ScrollViews + * (`horizontal` prop must be `false`). + * + * See [RefreshControl](docs/refreshcontrol.html). + */ + refreshControl?: React$Element<*>, + + /** + * Sometimes a scrollview takes up more space than its content fills. When this is + * the case, this prop will fill the rest of the scrollview with a color to avoid setting + * a background and creating unnecessary overdraw. This is an advanced optimization + * that is not needed in the general case. + * @platform android + */ + endFillColor?: Color, + + /** + * Tag used to log scroll performance on this scroll view. Will force + * momentum events to be turned on (see sendMomentumEvents). This doesn't do + * anything out of the box and you need to implement a custom native + * FpsListener for it to be useful. + * @platform android + */ + 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. + * + * @platform android + */ + overScrollMode?: 'auto' | 'always' | 'never', + } + + declare export class ScrollView extends React$Component { + // TODO(lmr): ScrollResponder.Mixin? + setNativeProps(props: ScrollViewProps): void, + + /** + * Returns a reference to the underlying scroll responder, which supports + * operations like `scrollTo`. All ScrollView-like components should + * implement this method so that they can be composed while providing access + * to the underlying scroll responder's methods. + */ + getScrollResponder(): ScrollView, + + getScrollableNode(): any, + + getInnerViewNode(): any, + + /** + * Scrolls to a given x, y offset, either immediately or with a smooth animation. + * + * Example: + * + * `scrollTo({x: 0, y: 0, animated: true})` + * + * Note: The weird function signature is due to the fact that, for historical reasons, + * the function also accepts separate arguments as an alternative to the options object. + * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. + */ + scrollTo( + y?: number | { x?: number, y?: number, animated?: boolean }, + x?: number, + animated?: boolean + ): void, + + /** + * If this is a vertical ScrollView scrolls to the bottom. + * If this is a horizontal ScrollView scrolls to the right. + * + * Use `scrollToEnd({animated: true})` for smooth animated scrolling, + * `scrollToEnd({animated: false})` for immediate scrolling. + * If no options are passed, `animated` defaults to true. + */ + scrollToEnd( + options?: { animated?: boolean }, + ): void, + } + + declare export var Platform: {| + OS: 'ios' | 'android', + Version: number, + isPad: boolean, + isTesting: boolean, + isTVOS: boolean, + select(obj: { [key: string]: T }): T, + |} + + declare type Dimension = { + width: number, + height: number, + scale: number, + fontScale: number, + }; + + declare type DimensionName = 'window' | 'screen'; + + declare export var Dimensions: {| + set(dims: { [key: DimensionName]: Dimension }): void, + get(dim: DimensionName): Dimensions, + addEventListener( + type: string, + handler: Function + ): void, + removeEventListener( + type: string, + handler: Function + ): void, + |} + + declare export var PixelRatio: {| + /** + * Returns the device pixel density. Some examples: + * + * - PixelRatio.get() === 1 + * - mdpi Android devices (160 dpi) + * - PixelRatio.get() === 1.5 + * - hdpi Android devices (240 dpi) + * - PixelRatio.get() === 2 + * - iPhone 4, 4S + * - iPhone 5, 5c, 5s + * - iPhone 6 + * - xhdpi Android devices (320 dpi) + * - PixelRatio.get() === 3 + * - iPhone 6 plus + * - xxhdpi Android devices (480 dpi) + * - PixelRatio.get() === 3.5 + * - Nexus 6 + */ + get(): number, + + /** + * Returns the scaling factor for font sizes. This is the ratio that is used to calculate the + * absolute font size, so any elements that heavily depend on that should use this to do + * calculations. + * + * If a font scale is not set, this returns the device pixel ratio. + * + * Currently this is only implemented on Android and reflects the user preference set in + * Settings > Display > Font size, on iOS it will always return the default pixel ratio. + * @platform android + */ + getFontScale(): number, + + /** + * Converts a layout size (dp) to pixel size (px). + * + * Guaranteed to return an integer number. + */ + getPixelSizeForLayoutSize(layoutSize: number): number, + + /** + * Rounds a layout size (dp) to the nearest layout size that corresponds to + * an integer number of pixels. For example, on a device with a PixelRatio + * of 3, `PixelRatio.roundToNearestPixel(8.4) = 8.33`, which corresponds to + * exactly (8.33 * 3) = 25 pixels. + */ + roundToNearestPixel(layoutSize: number): number, + + // No-op for iOS, but used on the web. Should not be documented. + startDetecting(): void, + |}; + + declare type LayoutAnimationTypesEnum = { + spring: 'spring', + linear: 'linear', + easeInEaseOut: 'easeInEaseOut', + easeIn: 'easeIn', + easeOut: 'easeOut', + keyboard: 'keyboard', + }; + + declare type LayoutAnimationPropertiesEnum = { + opacity: 'opacity', + scaleXY: 'scaleXY', + }; + + declare type Anim = { + duration?: number, + delay?: number, + springDamping?: number, + initialVelocity?: number, + type?: $Keys, + property?: $Keys, + }; + + declare type LayoutAnimationConfig = { + duration: number, + create?: Anim, + update?: Anim, + delete?: Anim, + }; + + declare export var LayoutAnimation: { + /** + * Schedules an animation to happen on the next layout. + * + * @param config Specifies animation properties: + * + * - `duration` in milliseconds + * - `create`, config for animating in new views (see `Anim` type) + * - `update`, config for animating views that have been updated + * (see `Anim` type) + * + * @param onAnimationDidEnd Called when the animation finished. + * Only supported on iOS. + * @param onError Called on error. Only supported on iOS. + */ + configureNext(config: LayoutAnimationConfig, onAnimationDidEnd?: Function): void, + /** + * Helper for creating a config for `configureNext`. + */ + create(duration: number, type, creationProp): LayoutAnimationConfig, + Types: LayoutAnimationTypesEnum, + Properties: LayoutAnimationPropertiesEnum, + Presets: { + easeInEaseOut: LayoutAnimationConfig, + linear: LayoutAnimationConfig, + spring: LayoutAnimationConfig, + }, + easeInEaseOut(onAnimationDidEnd?: Function): void, + linear(onAnimationDidEnd?: Function): void, + spring(onAnimationDidEnd?: Function): void, + }; + + declare type Event = Object; + declare type Selection = { + start: number, + end?: number, + }; + + declare type DataDetector = + 'phoneNumber' | + 'link' | + 'address' | + 'calendarEvent' | + 'none' | + 'all'; + + declare type TextInputState = {| + /** + * Returns the ID of the currently focused text field, if one exists + * If no text field is focused it returns null + */ + currentlyFocusedField(): ?number, + + /** + * @param {number} TextInputID id of the text field to focus + * Focuses the specified text field + * noop if the text field was already focused + */ + focusTextInput(textFieldID: ?number): void, + + /** + * @param {number} textFieldID id of the text field to focus + * Unfocuses the specified text field + * noop if it wasn't focused + */ + blurTextInput(textFieldID: ?number): void, + |}; + + declare type EventSubscription = { + eventType: string; + key: number; + subscriber: EventSubscriptionVendor; + remove(): void, + } + + declare type EventSubscriptionVendor = { + addSubscription(eventType: string, subscription: EventSubscription): EventSubscription, + removeAllSubscriptions(eventType: ?string): void, + removeSubscription(subscription: EventSubscription): void, + getSubscriptionsForType(eventType: string): ?[EventSubscription], + } + + declare type EmitterSubscription = { + emitter: EventEmitter; + listener: Function; + context: ?Object; + remove(): void, + } + + declare type EventEmitter = { + emit(eventType: T, ...args: any[]): void, + addListener(eventType: T, listener: Function, context: ?Object): EmitterSubscription, + once(eventType: T, listener: Function, context: ?Object): EmitterSubscription, + removeAllListeners(): void, + removeCurrentListener(): void, + removeSubscription(subscription: EmitterSubscription): void, + listeners(eventType: T): [EmitterSubscription], + removeListener(eventType: T, listener: Function): void, + } + + declare type EventHolderToken = { eventType: T, index: number }; + + declare type EventHolder = { + holdEvent(eventType: T, ...args: any[]): EventHolderToken, + emitToListener(eventType: ?T, listener: Function, context: ?Object): void, + releaseCurrentEvent(): void, + releaseEvent(token: EventHolderToken): void, + releaseEventType(eventType: T): void, + } + + declare type EventEmitterWithHolding = { + addListener(eventType: T, listener: Function, context: ?Object): EmitterSubscription, + once(eventType: T, listener: Function, context: ?Object): EmitterSubscription, + removeAllListeners(eventType: T): void, + removeCurrentListener(): void, + listeners(eventType: T): [EmitterSubscription], + emit(eventType: T, ...args: any[]): void, + + addRetroactiveListener(eventType: T, listener: Function, context: ?Object): EmitterSubscription, + emitAndHold(eventType: T, ...args: any[]): void, + releaseCurrentEvent(): void, + releaseHeldEventType(eventType: T): void, + } + + declare type DocumentSelectionState = {| + ...EventEmitterWithHolding<'blur' | 'focus' | 'update'>, + update(anchor, focus): void, + constrainLength(maxLength: number): void, + focus(): void, + blur(): void, + hasFocus(): void, + isCollapsed(): boolean, + isBackward(): boolean, + getAnchorOffset(): ?number, + getFocusOffset(): ?number, + getStartOffset(): ?number, + getEndOffset(): ?number, + overlaps(start: number, end: number): boolean, + |} + + declare type TextInputProps = { + ...ViewProps, + /** + * Can tell `TextInput` to automatically capitalize certain characters. + * + * - `characters`: all characters. + * - `words`: first letter of each word. + * - `sentences`: first letter of each sentence (*default*). + * - `none`: don't auto capitalize anything. + */ + autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters', + /** + * If `false`, disables auto-correct. The default value is `true`. + */ + autoCorrect?: boolean, + /** + * If `false`, disables spell-check style (i.e. red underlines). + * The default value is inherited from `autoCorrect`. + * @platform ios + */ + spellCheck?: boolean, + /** + * If `true`, focuses the input on `componentDidMount`. + * The default value is `false`. + */ + autoFocus?: boolean, + /** + * If `false`, text is not editable. The default value is `true`. + */ + editable?: boolean, + /** + * Determines which keyboard to open, e.g.`numeric`. + * + * The following values work across platforms: + * + * - `default` + * - `numeric` + * - `email-address` + * - `phone-pad` + */ + keyboardType?: + // Cross-platform + 'default' | + 'email-address' | + 'numeric' | + 'phone-pad' | + // iOS-only + 'ascii-capable' | + 'numbers-and-punctuation' | + 'url' | + 'number-pad' | + 'name-phone-pad' | + 'decimal-pad' | + 'twitter' | + 'web-search', + /** + * Determines the color of the keyboard. + * @platform ios + */ + keyboardAppearance?: 'default' | 'light' | 'dark', + /** + * Determines how the return key should look. On Android you can also use + * `returnKeyLabel`. + * + * *Cross platform* + * + * The following values work across platforms: + * + * - `done` + * - `go` + * - `next` + * - `search` + * - `send` + * + * *Android Only* + * + * The following values work on Android only: + * + * - `none` + * - `previous` + * + * *iOS Only* + * + * The following values work on iOS only: + * + * - `default` + * - `emergency-call` + * - `google` + * - `join` + * - `route` + * - `yahoo` + */ + returnKeyType?: + // Cross-platform + 'done'| + 'go'| + 'next'| + 'search'| + 'send'| + // Android-only + 'none'| + 'previous'| + // iOS-only + 'default'| + 'emergency-call'| + 'google'| + 'join'| + 'route'| + 'yahoo', + /** + * Sets the return key to the label. Use it instead of `returnKeyType`. + * @platform android + */ + returnKeyLabel?: string, + /** + * Limits the maximum number of characters that can be entered. Use this + * instead of implementing the logic in JS to avoid flicker. + */ + maxLength?: number, + /** + * Sets the number of lines for a `TextInput`. Use it with multiline set to + * `true` to be able to fill the lines. + * @platform android + */ + numberOfLines?: number, + /** + * When `false`, if there is a small amount of space available around a text input + * (e.g. landscape orientation on a phone), the OS may choose to have the user edit + * the text inside of a full screen text input mode. When `true`, this feature is + * disabled and users will always edit the text directly inside of the text input. + * Defaults to `false`. + * @platform android + */ + disableFullscreenUI?: boolean, + /** + * If `true`, the keyboard disables the return key when there is no text and + * automatically enables it when there is text. The default value is `false`. + * @platform ios + */ + enablesReturnKeyAutomatically?: boolean, + /** + * If `true`, the text input can be multiple lines. + * The default value is `false`. + */ + multiline?: boolean, + /** + * Set text break strategy on Android API Level 23+, possible values are `simple`, `highQuality`, `balanced` + * The default value is `simple`. + * @platform android + */ + textBreakStrategy?: 'simple' | 'highQuality' | 'balanced', + /** + * Callback that is called when the text input is blurred. + */ + onBlur?: Function, + /** + * Callback that is called when the text input is focused. + */ + onFocus?: Function, + /** + * Callback that is called when the text input's text changes. + */ + onChange?: Function, + /** + * Callback that is called when the text input's text changes. + * Changed text is passed as an argument to the callback handler. + */ + onChangeText?: Function, + /** + * Callback that is called when the text input's content size changes. + * This will be called with + * `{ nativeEvent: { contentSize: { width, height } } }`. + * + * Only called for multiline text inputs. + */ + onContentSizeChange?: Function, + /** + * Callback that is called when text input ends. + */ + onEndEditing?: Function, + /** + * Callback that is called when the text input selection is changed. + * This will be called with + * `{ nativeEvent: { selection: { start, end } } }`. + */ + onSelectionChange?: Function, + /** + * Callback that is called when the text input's submit button is pressed. + * Invalid if `multiline={true}` is specified. + */ + onSubmitEditing?: Function, + /** + * Callback that is called when a key is pressed. + * This will be called with `{ nativeEvent: { key: keyValue } }` + * where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and + * the typed-in character otherwise including `' '` for space. + * Fires before `onChange` callbacks. + * @platform ios + */ + onKeyPress?: Function, + /** + * Invoked on mount and layout changes with `{x, y, width, height}`. + */ + onLayout?: Function, + /** + * Invoked on content scroll with `{ nativeEvent: { contentOffset: { x, y } } }`. + * May also contain other properties from ScrollEvent but on Android contentSize + * is not provided for performance reasons. + */ + onScroll?: Function, + /** + * The string that will be rendered before text input has been entered. + */ + placeholder?: Function, + /** + * The text color of the placeholder string. + */ + placeholderTextColor?: Color, + /** + * If `true`, the text input obscures the text entered so that sensitive text + * like passwords stay secure. The default value is `false`. + */ + secureTextEntry?: boolean, + /** + * The highlight and cursor color of the text input. + */ + selectionColor?: Color, + /** + * An instance of `DocumentSelectionState`, this is some state that is responsible for + * maintaining selection information for a document. + * + * Some functionality that can be performed with this instance is: + * + * - `blur()` + * - `focus()` + * - `update()` + * + * > You can reference `DocumentSelectionState` in + * > [`vendor/document/selection/DocumentSelectionState.js`](https://github.com/facebook/react-native/blob/master/Libraries/vendor/document/selection/DocumentSelectionState.js) + * + * @platform ios + */ + selectionState?: DocumentSelectionState, + /** + * The start and end of the text input's selection. Set start and end to + * the same value to position the cursor. + */ + selection?: { + start: number, + end?: number, + }, + /** + * The value to show for the text input. `TextInput` is a controlled + * component, which means the native value will be forced to match this + * value prop if provided. For most uses, this works great, but in some + * cases this may cause flickering - one common cause is preventing edits + * by keeping value the same. In addition to simply setting the same value, + * either set `editable={false}`, or set/update `maxLength` to prevent + * unwanted edits without flicker. + */ + value?: string, + /** + * Provides an initial value that will change when the user starts typing. + * Useful for simple use-cases where you do not want to deal with listening + * to events and updating the value prop to keep the controlled state in sync. + */ + defaultValue?: string, + /** + * When the clear button should appear on the right side of the text view. + * @platform ios + */ + clearButtonMode?: 'never' | 'while-editing' | 'unless-editing' | 'always', + /** + * If `true`, clears the text field automatically when editing begins. + * @platform ios + */ + clearTextOnFocus?: boolean, + /** + * If `true`, all text will automatically be selected on focus. + */ + selectTextOnFocus?: boolean, + /** + * If `true`, the text field will blur when submitted. + * The default value is true for single-line fields and false for + * multiline fields. Note that for multiline fields, setting `blurOnSubmit` + * to `true` means that pressing return will blur the field and trigger the + * `onSubmitEditing` event instead of inserting a newline into the field. + */ + blurOnSubmit?: boolean, + /** + * Note that not all Text styles are supported, + * see [Issue#7070](https://github.com/facebook/react-native/issues/7070) + * for more detail. + * + * [Styles](docs/style.html) + */ + style?: StyleProp, + /** + * The color of the `TextInput` underline. + * @platform android + */ + underlineColorAndroid?: Color, + + /** + * If defined, the provided image resource will be rendered on the left. + * @platform android + */ + inlineImageLeft?: string, + + /** + * Padding between the inline image, if any, and the text input itself. + * @platform android + */ + inlineImagePadding?: number, + + /** + * Determines the types of data converted to clickable URLs in the text input. + * Only valid if `multiline={true}` and `editable={false}`. + * By default no data types are detected. + * + * You can provide one type or an array of many types. + * + * Possible values for `dataDetectorTypes` are: + * + * - `'phoneNumber'` + * - `'link'` + * - `'address'` + * - `'calendarEvent'` + * - `'none'` + * - `'all'` + * + * @platform ios + */ + dataDetectorTypes: DataDetector | Array, + /** + * If `true`, caret is hidden. The default value is `false`. + */ + caretHidden?: boolean, + }; + + declare export class TextInput extends React$Component { + static State: TextInputState, + + isFocused(): boolean, + clear(): void, + blur(): void, + focus(): void, + measure(callback: MeasureOnSuccessCallback): void, + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void, + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail: () => void, + ): void, + setNativeProps(nativeProps: TextInputProps): void, + } + + declare type AlertType = $Enum<{ + 'default': string, + 'plain-text': string, + 'secure-text': string, + 'login-password': string, + }>; + + declare type AlertButtonStyle = $Enum<{ + 'default': string, + 'cancel': string, + 'destructive': string, + }>; + + /** + * Array or buttons + * @typedef {Array} ButtonsArray + * @property {string=} text Button label + * @property {Function=} onPress Callback function when button pressed + * @property {AlertButtonStyle=} style Button style + */ + declare type ButtonsArray = Array<{ + /** + * Button label + */ + text?: string, + /** + * Callback function when button pressed + */ + onPress?: ?Function, + /** + * Button style + */ + style?: AlertButtonStyle, + }>; + + declare type AlertButtons = Array<{ + text?: string, + onPress?: ?Function, + style?: AlertButtonStyle, + }>; + + declare type AlertOptions = { + cancelable?: ?boolean, + onDismiss?: ?Function, + }; + + declare export var Alert: {| + alert( + title: ?string, + message?: ?string, + buttons?: AlertButtons, + options?: AlertOptions, + type?: AlertType, + ): void, + |}; + + declare export var Linking: {| + ...$Exact>, + addEventListener(type: string, handler: Function): void, + removeEventListener(type: string, handler: Function ): void, + + /** + * Try to open the given `url` with any of the installed apps. + * + * You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386" on Android + * or "http://maps.apple.com/?ll=37.484847,-122.148386" on iOS), a contact, + * or any other URL that can be opened with the installed apps. + * + * The method returns a `Promise` object. If the user confirms the open dialog or the + * url automatically opens, the promise is resolved. If the user cancels the open dialog + * or there are no registered applications for the url, the promise is rejected. + * + * NOTE: This method will fail if the system doesn't know how to open the specified URL. + * If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first. + * + * NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! + */ + openURL(url: string): Promise, + + /** + * Determine whether or not an installed app can handle a given URL. + * + * NOTE: For web URLs, the protocol ("http://", "https://") must be set accordingly! + * + * NOTE: As of iOS 9, your app needs to provide the `LSApplicationQueriesSchemes` key + * inside `Info.plist` or canOpenURL will always return false. + * + * @param URL the URL to open + */ + canOpenURL(url: string): Promise, + + /** + * If the app launch was triggered by an app link, + * it will give the link url, otherwise it will give `null` + * + * NOTE: To support deep linking on Android, refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents + */ + getInitialURL(): Promise, + |}; + + declare export var processColor: Color => number; + + declare type KeyboardEventName = + | 'keyboardWillShow' + | 'keyboardDidShow' + | 'keyboardWillHide' + | 'keyboardDidHide' + | 'keyboardWillChangeFrame' + | 'keyboardDidChangeFrame'; + + declare type KeyboardEventData = { + endCoordinates: { + width: number, + height: number, + screenX: number, + screenY: number, + }, + }; + + declare type KeyboardEventListener = (e: KeyboardEventData) => void; + + declare export var Keyboard: {| + ...$Exact>, + dismiss(): void, + |}; + + declare export var AsyncStorage: {| + /** + * Fetches an item for a `key` and invokes a callback upon completion. + * Returns a `Promise` object. + * @param key Key of the item to fetch. + * @param callback Function that will be called with a result if found or + * any error. + * @returns A `Promise` object. + */ + getItem( + key: string, + callback?: ?(error: ?Error, result: ?string) => void + ): Promise, + + /** + * Sets the value for a `key` and invokes a callback upon completion. + * Returns a `Promise` object. + * @param key Key of the item to set. + * @param value Value to set for the `key`. + * @param callback Function that will be called with any error. + * @returns A `Promise` object. + */ + setItem( + key: string, + value: string, + callback?: ?(error: ?Error) => void + ): Promise, + + /** + * Removes an item for a `key` and invokes a callback upon completion. + * Returns a `Promise` object. + * @param key Key of the item to remove. + * @param callback Function that will be called with any error. + * @returns A `Promise` object. + */ + removeItem( + key: string, + callback?: ?(error: ?Error) => void + ): Promise, + + /** + * Merges an existing `key` value with an input value, assuming both values + * are stringified JSON. Returns a `Promise` object. + * + * **NOTE:** This is not supported by all native implementations. + * + * @param key Key of the item to modify. + * @param value New value to merge for the `key`. + * @param callback Function that will be called with any error. + * @returns A `Promise` object. + * + * @example Example + * let UID123_object = { + * name: 'Chris', + * age: 30, + * traits: {hair: 'brown', eyes: 'brown'}, + * }; + * // You only need to define what will be added or updated + * let UID123_delta = { + * age: 31, + * traits: {eyes: 'blue', shoe_size: 10} + * }; + * + * AsyncStorage.setItem('UID123', JSON.stringify(UID123_object), () => { + * AsyncStorage.mergeItem('UID123', JSON.stringify(UID123_delta), () => { + * AsyncStorage.getItem('UID123', (err, result) => { + * console.log(result); + * }); + * }); + * }); + * + * // Console log result: + * // => {'name':'Chris','age':31,'traits': + * // {'shoe_size':10,'hair':'brown','eyes':'blue'}} + */ + mergeItem( + key: string, + value: string, + callback?: ?(error: ?Error) => void + ): Promise, + + /** + * Erases *all* `AsyncStorage` for all clients, libraries, etc. You probably + * don't want to call this; use `removeItem` or `multiRemove` to clear only + * your app's keys. Returns a `Promise` object. + * @param callback Function that will be called with any error. + * @returns A `Promise` object. + */ + clear(callback?: ?(error: ?Error) => void): Promise, + + /** + * Gets *all* keys known to your app; for all callers, libraries, etc. + * Returns a `Promise` object. + * @param callback Function that will be called the keys found and any error. + * @returns A `Promise` object. + * + * Example: see the `multiGet` example. + */ + getAllKeys(callback?: ?(error: ?Error, keys: ?Array) => void): Promise, + + /** + * The following batched functions are useful for executing a lot of + * operations at once, allowing for native optimizations and provide the + * convenience of a single callback after all operations are complete. + * + * These functions return arrays of errors, potentially one for every key. + * For key-specific errors, the Error object will have a key property to + * indicate which key caused the error. + */ + + /** Flushes any pending requests using a single batch call to get the data. */ + flushGetRequests(): void, + + /** + * This allows you to batch the fetching of items given an array of `key` + * inputs. Your callback will be invoked with an array of corresponding + * key-value pairs found: + * + * ``` + * multiGet(['k1', 'k2'], cb) -> cb([['k1', 'val1'], ['k2', 'val2']]) + * ``` + * + * The method returns a `Promise` object. + * + * @param keys Array of key for the items to get. + * @param callback Function that will be called with a key-value array of + * the results, plus an array of any key-specific errors found. + * @returns A `Promise` object. + * + * @example Example + * + * AsyncStorage.getAllKeys((err, keys) => { + * AsyncStorage.multiGet(keys, (err, stores) => { + * stores.map((result, i, store) => { + * // get at each store's key/value so you can work with it + * let key = store[i][0]; + * let value = store[i][1]; + * }); + * }); + * }); + */ + multiGet( + keys: Array, + callback?: ?(errors: ?Array, result: ?Array>) => void + ): Promise, + + /** + * Use this as a batch operation for storing multiple key-value pairs. When + * the operation completes you'll get a single callback with any errors: + * + * ``` + * multiSet([['k1', 'val1'], ['k2', 'val2']], cb); + * ``` + * + * The method returns a `Promise` object. + * + * @param keyValuePairs Array of key-value array for the items to set. + * @param callback Function that will be called with an array of any + * key-specific errors found. + * @returns A `Promise` object. + * Example: see the `multiMerge` example. + */ + multiSet( + keyValuePairs: Array>, + callback?: ?(errors: ?Array) => void + ): Promise, + + /** + * Call this to batch the deletion of all keys in the `keys` array. Returns + * a `Promise` object. + * + * @param keys Array of key for the items to delete. + * @param callback Function that will be called an array of any key-specific + * errors found. + * @returns A `Promise` object. + * + * @example Example + * let keys = ['k1', 'k2']; + * AsyncStorage.multiRemove(keys, (err) => { + * // keys k1 & k2 removed, if they existed + * // do most stuff after removal (if you want) + * }); + */ + multiRemove( + keys: Array, + callback?: ?(errors: ?Array) => void + ): Promise, + + /** + * Batch operation to merge in existing and new values for a given set of + * keys. This assumes that the values are stringified JSON. Returns a + * `Promise` object. + * + * **NOTE**: This is not supported by all native implementations. + * + * @param keyValuePairs Array of key-value array for the items to merge. + * @param callback Function that will be called with an array of any + * key-specific errors found. + * @returns A `Promise` object. + * + * @example Example + * // first user, initial values + * let UID234_object = { + * name: 'Chris', + * age: 30, + * traits: {hair: 'brown', eyes: 'brown'}, + * }; + * + * // first user, delta values + * let UID234_delta = { + * age: 31, + * traits: {eyes: 'blue', shoe_size: 10}, + * }; + * + * // second user, initial values + * let UID345_object = { + * name: 'Marge', + * age: 25, + * traits: {hair: 'blonde', eyes: 'blue'}, + * }; + * + * // second user, delta values + * let UID345_delta = { + * age: 26, + * traits: {eyes: 'green', shoe_size: 6}, + * }; + * + * let multi_set_pairs = [['UID234', JSON.stringify(UID234_object)], ['UID345', JSON.stringify(UID345_object)]] + * let multi_merge_pairs = [['UID234', JSON.stringify(UID234_delta)], ['UID345', JSON.stringify(UID345_delta)]] + * + * AsyncStorage.multiSet(multi_set_pairs, (err) => { + * AsyncStorage.multiMerge(multi_merge_pairs, (err) => { + * AsyncStorage.multiGet(['UID234','UID345'], (err, stores) => { + * stores.map( (result, i, store) => { + * let key = store[i][0]; + * let val = store[i][1]; + * console.log(key, val); + * }); + * }); + * }); + * }); + * + * // Console log results: + * // => UID234 {"name":"Chris","age":31,"traits":{"shoe_size":10,"hair":"brown","eyes":"blue"}} + * // => UID345 {"name":"Marge","age":26,"traits":{"shoe_size":6,"hair":"blonde","eyes":"green"}} + */ + multiMerge( + keyValuePairs: Array>, + callback?: ?(errors: ?Array) => void + ): Promise, + |}; + + declare type InteractionManagerEvents = { + interactionStart: 'interactionStart', + interactionComplete: 'interactionComplete', + }; + + declare export var InteractionManager: {| + Events: InteractionManagerEvents, + + /** + * Schedule a function to run after all interactions have completed. Returns a cancellable + * "promise". + */ + runAfterInteractions(task: ?Task): {then: Function, done: Function, cancel: Function}, + + /** + * Notify manager that an interaction has started. + */ + createInteractionHandle(): Handle, + + /** + * Notify manager that an interaction has completed. + */ + clearInteractionHandle(handle: Handle): void, + + addListener( + eventType: $Keys, + listener: Function, + context: ?Object + ): EmitterSubscription<$Keys>, + + /** + * A positive number will use setTimeout to schedule any tasks after the + * eventLoopRunningTime hits the deadline value, otherwise all tasks will be + * executed in one setImmediate batch (default). + */ + setDeadline(deadline: number): void, + |}; + + declare type EasingFunction = (t: number) => number; + + declare export var Easing: {| + step0: (n: number) => EasingFunction, + step1: (n: number) => EasingFunction, + linear: EasingFunction, + ease: EasingFunction, + quad: EasingFunction, + cubic: EasingFunction, + + /** + * A power function. Position is equal to the Nth power of elapsed time. + * + * n = 4: http://easings.net/#easeInQuart + * n = 5: http://easings.net/#easeInQuint + */ + poly: EasingFunction, + + /** + * A sinusoidal function. + * + * http://easings.net/#easeInSine + */ + sin: EasingFunction, + + /** + * A circular function. + * + * http://easings.net/#easeInCirc + */ + circle: EasingFunction, + + /** + * An exponential function. + * + * http://easings.net/#easeInExpo + */ + exp: EasingFunction, + + /** + * A simple elastic interaction, similar to a spring oscillating back and + * forth. + * + * Default bounciness is 1, which overshoots a little bit once. 0 bounciness + * doesn't overshoot at all, and bounciness of N > 1 will overshoot about N + * times. + * + * http://easings.net/#easeInElastic + * + * Wolfram Plots: + * + * - http://tiny.cc/elastic_b_1 (bounciness = 1, default) + * - http://tiny.cc/elastic_b_3 (bounciness = 3) + */ + elastic(bounciness?: number): EasingFunction, + + /** + * Use with `Animated.parallel()` to create a simple effect where the object + * animates back slightly as the animation starts. + * + * Wolfram Plot: + * + * - http://tiny.cc/back_default (s = 1.70158, default) + */ + back(s: number): EasingFunction, + + /** + * Provides a simple bouncing effect. + * + * http://easings.net/#easeInBounce + */ + bounce: EasingFunction, + + /** + * Provides a cubic bezier curve, equivalent to CSS Transitions' + * `transition-timing-function`. + * + * A useful tool to visualize cubic bezier curves can be found at + * http://cubic-bezier.com/ + */ + bezier( + x1: number, + y1: number, + x2: number, + y2: number + ): EasingFunction, + + /** + * Runs an easing function forwards. + */ + in(easing: EasingFunction): EasingFunction, + + /** + * Runs an easing function backwards. + */ + out(easing: EasingFunction): EasingFunction, + + /** + * Makes any easing function symmetrical. The easing function will run + * forwards for half of the duration, then backwards for the rest of the + * duration. + */ + inOut(easing: EasingFunction): EasingFunction, + |}; + + + + + + declare type ExtrapolateType = 'extend' | 'identity' | 'clamp'; + declare type InterpolationConfigType = { + inputRange: Array, + outputRange: (Array | Array), + easing?: ((input: number) => number), + extrapolate?: ExtrapolateType, + extrapolateLeft?: ExtrapolateType, + extrapolateRight?: ExtrapolateType, + }; + declare type EndResult = {finished: bool}; + declare type EndCallback = (result: EndResult) => void; + declare type AnimationConfig = { + isInteraction?: bool, + useNativeDriver?: bool, + onComplete?: ?EndCallback, + iterations?: number, + }; + + declare class Interpolation { + static create(config: InterpolationConfigType): (input: number) => number | string, + } + + declare class BaseAnimated { + + } + + declare class Animation { + start( + fromValue: number, + onUpdate: (value: number) => void, + onEnd: ?EndCallback, + previousAnimation: ?Animation, + animatedValue: AnimatedValue + ): void, + onUpdate(): void, + stop(): void, + } + + declare class AnimatedWithChildren extends BaseAnimated {} + + declare class TimingAnimation extends Animation {} + + declare type DecayAnimationConfig = AnimationConfig & { + velocity: number | {x: number, y: number}, + deceleration?: number, + }; + + declare type DecayAnimationConfigSingle = AnimationConfig & { + velocity: number, + deceleration?: number, + }; + + declare type SpringAnimationConfig = AnimationConfig & { + toValue: number | AnimatedValue | {x: number, y: number} | AnimatedValueXY, + overshootClamping?: bool, + restDisplacementThreshold?: number, + restSpeedThreshold?: number, + velocity?: number | {x: number, y: number}, + bounciness?: number, + speed?: number, + tension?: number, + friction?: number, + }; + + declare type SpringAnimationConfigSingle = AnimationConfig & { + toValue: number | AnimatedValue, + overshootClamping?: bool, + restDisplacementThreshold?: number, + restSpeedThreshold?: number, + velocity?: number, + bounciness?: number, + speed?: number, + tension?: number, + friction?: number, + }; + + declare class DecayAnimation extends Animation {} + declare class SpringAnimation extends Animation {} + + declare type ValueListenerCallback = (state: {value: number}) => void; + + declare class AnimatedValue extends AnimatedWithChildren { + constructor(value: number): void, + /** + * Directly set the value. This will stop any animations running on the value + * and update all the bound properties. + */ + setValue(value: number): void, + + /** + * Sets an offset that is applied on top of whatever value is set, whether via + * `setValue`, an animation, or `Animated.event`. Useful for compensating + * things like the start of a pan gesture. + */ + setOffset(offset: number): void, + + /** + * Merges the offset value into the base value and resets the offset to zero. + * The final output of the value is unchanged. + */ + flattenOffset(): void, + + /** + * Sets the offset value to the base value, and resets the base value to zero. + * The final output of the value is unchanged. + */ + extractOffset(): void, + + /** + * Adds an asynchronous listener to the value so you can observe updates from + * animations. This is useful because there is no way to + * synchronously read the value because it might be driven natively. + */ + addListener(callback: ValueListenerCallback): string, + + removeListener(id: string): void, + + removeAllListeners(): void, + + /** + * Stops any running animation or tracking. `callback` is invoked with the + * final value after stopping the animation, which is useful for updating + * state to match the animation position with layout. + */ + stopAnimation(callback?: ?(value: number) => void): void, + + /** + * Stops any animation and resets the value to its original + */ + resetAnimation(callback?: ?(value: number) => void): void, + + /** + * Interpolates the value before updating the property, e.g. mapping 0-1 to + * 0-10. + */ + interpolate(config: InterpolationConfigType): AnimatedInterpolation, + + /** + * Typically only used internally, but could be used by a custom Animation + * class. + */ + animate(animation: Animation, callback: ?EndCallback): void, + + /** + * Typically only used internally. + */ + stopTracking(): void, + + /** + * Typically only used internally. + */ + track(tracking: BaseAnimated): void, + } + + declare type ValueXYListenerCallback = (value: {x: number, y: number}) => void; + + declare class AnimatedValueXY extends AnimatedWithChildren { + x: AnimatedValue; + y: AnimatedValue; + constructor(valueIn?: ?{x: number | AnimatedValue, y: number | AnimatedValue}): void, + + setValue(value: {x: number, y: number}): void, + + setOffset(offset: {x: number, y: number}): void, + + flattenOffset(): void, + + extractOffset(): void, + + resetAnimation(callback?: (value: {x: number, y: number}) => void): void, + + stopAnimation(callback?: (value: {x: number, y: number}) => void): void, + + addListener(callback: ValueXYListenerCallback): string, + + removeListener(id: string): void, + + removeAllListeners(): void, + + /** + * Converts `{x, y}` into `{left, top}` for use in style, e.g. + * + *```javascript + * style={this.state.anim.getLayout()} + *``` + */ + getLayout(): {[key: string]: AnimatedValue}, + + /** + * Converts `{x, y}` into a useable translation transform, e.g. + * + *```javascript + * style={{ + * transform: this.state.anim.getTranslateTransform() + * }} + *``` + */ + getTranslateTransform(): Array<{[key: string]: AnimatedValue}>, + } + + declare class AnimatedInterpolation extends AnimatedWithChildren { + constructor(parent: BaseAnimated, config: InterpolationConfigType): void, + interpolate(config: InterpolationConfigType): AnimatedInterpolation, + } + + declare class AnimatedAddition extends AnimatedWithChildren { + constructor(a: BaseAnimated | number, b: BaseAnimated | number): void, + interpolate(config: InterpolationConfigType): AnimatedInterpolation, + } + + declare class AnimatedDivision extends AnimatedWithChildren { + constructor(a: BaseAnimated | number, b: BaseAnimated | number): void, + interpolate(config: InterpolationConfigType): AnimatedInterpolation, + } + + declare class AnimatedMultiplication extends AnimatedWithChildren { + constructor(a: BaseAnimated | number, b: BaseAnimated | number): void, + interpolate(config: InterpolationConfigType): AnimatedInterpolation, + } + + declare class AnimatedModulo extends AnimatedWithChildren { + constructor(a: BaseAnimated | number, moduluis: number): void, + interpolate(config: InterpolationConfigType): AnimatedInterpolation, + } + + declare class AnimatedDiffClamp extends AnimatedWithChildren { + constructor(a: BaseAnimated, min: number, max: number): void, + interpolate(config: InterpolationConfigType): AnimatedInterpolation, + } + + declare class AnimatedTransform extends AnimatedWithChildren { + constructor(transforms: Array): void, + } + + declare class AnimatedStyle extends AnimatedWithChildren { + constructor(style: any): void, + } + + declare class AnimatedProps extends AnimatedWithChildren { + constructor( + props: Object, + callback: () => void, + ): void, + update(): void, + setNativeView(animatedView: any): void, + } + + declare class AnimatedComponent extends React$Component<*,*,*> { + getNode(): any, + } + + declare class AnimatedTracking extends BaseAnimated { + constructor( + value: AnimatedValue, + parent: BaseAnimated, + animationClass: any, + animationConfig: Object, + callback?: ?EndCallback, + ): void, + update(): void, + } + + declare type CompositeAnimation = { + start: (callback?: ?EndCallback) => void, + stop: () => void, + reset: () => void, + }; + + declare type ParallelConfig = { + stopTogether?: bool, // If one is stopped, stop all. default: true + } + + declare type LoopAnimationConfig = { iterations: number }; + + declare type Mapping = {[key: string]: Mapping} | AnimatedValue; + declare type EventConfig = { + listener?: ?Function, + useNativeDriver?: bool, + }; + + declare class AnimatedEvent { + + } + + declare var Animated: {| + /** + * Standard value class for driving animations. Typically initialized with + * `new Animated.Value(0);` + * + * See also [`AnimatedValue`](docs/animated.html#animatedvalue). + */ + Value: Class, + /** + * 2D value class for driving 2D animations, such as pan gestures. + * + * See also [`AnimatedValueXY`](docs/animated.html#animatedvaluexy). + */ + ValueXY: Class, + /** + * exported to use the Interpolation type in flow + * + * See also [`AnimatedInterpolation`](docs/animated.html#animatedinterpolation). + */ + Interpolation: Class, + + /** + * Animates a value from an initial velocity to zero based on a decay + * coefficient. + * + * Config is an object that may have the following options: + * + * - `velocity`: Initial velocity. Required. + * - `deceleration`: Rate of decay. Default 0.997. + * - `useNativeDriver`: Uses the native driver when true. Default false. + */ + decay(value: AnimatedValue | AnimatedValueXY, config: DecayAnimationConfig): CompositeAnimation, + /** + * Animates a value along a timed easing curve. The + * [`Easing`](docs/easing.html) module has tons of predefined curves, or you + * can use your own function. + * + * Config is an object that may have the following options: + * + * - `duration`: Length of animation (milliseconds). Default 500. + * - `easing`: Easing function to define curve. + * Default is `Easing.inOut(Easing.ease)`. + * - `delay`: Start the animation after delay (milliseconds). Default 0. + * - `useNativeDriver`: Uses the native driver when true. Default false. + */ + timing(value: AnimatedValue | AnimatedValueXY, config: TimingAnimationConfig): CompositeAnimation, + /** + * Spring animation based on Rebound and + * [Origami](https://facebook.github.io/origami/). Tracks velocity state to + * create fluid motions as the `toValue` updates, and can be chained together. + * + * Config is an object that may have the following options. Note that you can + * only define bounciness/speed or tension/friction but not both: + * + * - `friction`: Controls "bounciness"/overshoot. Default 7. + * - `tension`: Controls speed. Default 40. + * - `speed`: Controls speed of the animation. Default 12. + * - `bounciness`: Controls bounciness. Default 8. + * - `useNativeDriver`: Uses the native driver when true. Default false. + */ + spring(value: AnimatedValue | AnimatedValueXY, config: SpringAnimationConfig): CompositeAnimation, + + /** + * Creates a new Animated value composed from two Animated values added + * together. + */ + add(a: BaseAnimated | number, b: BaseAnimated | number): AnimatedAddition, + + /** + * Creates a new Animated value composed by dividing the first Animated value + * by the second Animated value. + */ + divide(a: BaseAnimated | number, b: BaseAnimated | number): AnimatedDivision, + + /** + * Creates a new Animated value composed from two Animated values multiplied + * together. + */ + multiply(a: BaseAnimated | number, b: BaseAnimated | number): AnimatedMultiplication, + + /** + * Creates a new Animated value that is the (non-negative) modulo of the + * provided Animated value + */ + modulo(a: BaseAnimated, modulus: number): AnimatedModulo, + + /** + * Create a new Animated value that is limited between 2 values. It uses the + * difference between the last value so even if the value is far from the bounds + * it will start changing when the value starts getting closer again. + * (`value = clamp(value + diff, min, max)`). + * + * This is useful with scroll events, for example, to show the navbar when + * scrolling up and to hide it when scrolling down. + */ + diffClamp(a: BaseAnimated, min: number, max: number): AnimatedDiffClamp, + + /** + * Starts an animation after the given delay. + */ + delay(time: number): CompositeAnimation, + /** + * Starts an array of animations in order, waiting for each to complete + * before starting the next. If the current running animation is stopped, no + * following animations will be started. + */ + sequence(animations: Array): CompositeAnimation, + /** + * Starts an array of animations all at the same time. By default, if one + * of the animations is stopped, they will all be stopped. You can override + * this with the `stopTogether` flag. + */ + parallel(animations: Array, config?: ?ParallelConfig): CompositeAnimation, + /** + * Array of animations may run in parallel (overlap), but are started in + * sequence with successive delays. Nice for doing trailing effects. + */ + stagger(time: number, animations: Array): CompositeAnimation, + /** + * Loops a given animation continuously, so that each time it reaches the + * end, it resets and begins again from the start. Can specify number of + * times to loop using the key 'iterations' in the config. Will loop without + * blocking the UI thread if the child animation is set to 'useNativeDriver'. + */ + loop(animation: CompositeAnimation, config?: LoopAnimationConfig): CompositeAnimation, + + /** + * Takes an array of mappings and extracts values from each arg accordingly, + * then calls `setValue` on the mapped outputs. e.g. + * + *```javascript + * onScroll={Animated.event( + * [{nativeEvent: {contentOffset: {x: this._scrollX}}}] + * {listener}, // Optional async listener + * ) + * ... + * onPanResponderMove: Animated.event([ + * null, // raw event arg ignored + * {dx: this._panX}, // gestureState arg + * ]), + *``` + * + * Config is an object that may have the following options: + * + * - `listener`: Optional async listener. + * - `useNativeDriver`: Uses the native driver when true. Default false. + */ + event(argMapping: Array, config?: EventConfig): any, + + /** + * Make any React component Animatable. Used to create `Animated.View`, etc. + */ + createAnimatedComponent(Component: React$Component<*>): AnimatedComponent, + + /** + * Imperative API to attach an animated value to an event on a view. Prefer using + * `Animated.event` with `useNativeDrive: true` if possible. + */ + attachNativeEvent(viewRef: any, eventName: string, argMapping: Array): void, + + /** + * Advanced imperative API for snooping on animated events that are passed in through props. Use + * values directly where possible. + */ + forkEvent(event: ?AnimatedEvent | ?Function, listener: Function): AnimatedEvent | Function, + unforkEvent(event: ?AnimatedEvent | ?Function, listener: Function): void , + |}; + + declare export function findNodeHandle(componentOrHandle: any): ?number; + + declare type TouchableWithoutFeedbackProps = { + accessible?: boolean, + accessibilityComponentType?: AccessibilityComponentType, + accessibilityTraits?: AccessibilityTrait | Array, + /** + * If true, disable all interactions for this component. + */ + disabled?: boolean, + /** + * Called when the touch is released, but not if cancelled (e.g. by a scroll + * that steals the responder lock). + */ + onPress?: Function, + onPressIn?: Function, + onPressOut?: Function, + /** + * Invoked on mount and layout changes with + * + * `{nativeEvent: {layout: {x, y, width, height}}}` + */ + onLayout?: Function, + + onLongPress?: Function, + + /** + * Delay in ms, from the start of the touch, before onPressIn is called. + */ + delayPressIn?: number, + /** + * Delay in ms, from the release of the touch, before onPressOut is called. + */ + delayPressOut?: number, + /** + * Delay in ms, from onPressIn, before onLongPress is called. + */ + delayLongPress?: number, + /** + * When the scroll view is disabled, this defines how far your touch may + * move off of the button, before deactivating the button. Once deactivated, + * try moving it back and you'll see that the button is once again + * reactivated! Move it back and forth several times while the scroll view + * is disabled. Ensure you pass in a constant to reduce memory allocations. + */ + pressRetentionOffset?: EdgeInsetsProp, + /** + * This defines how far your touch can start away from the button. This is + * added to `pressRetentionOffset` when moving off of the button. + * ** NOTE ** + * The touch area never extends past the parent view bounds and the Z-index + * of sibling views always takes precedence if a touch hits two overlapping + * views. + */ + hitSlop?: EdgeInsetsProp, + }; + + declare export class TouchableWithoutFeedback extends React$Component { + blur(): void, + focus(): void, + measure(callback: MeasureOnSuccessCallback): void, + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void, + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail: () => void, + ): void, + setNativeProps(nativeProps: TouchableWithoutFeedbackProps): void, + } + + declare type TouchableOpacityProps = { + ...TouchableWithoutFeedbackProps, + /** + * Determines what the opacity of the wrapped view should be when touch is + * active. Defaults to 0.2. + */ + activeOpacity?: number, + focusedOpacity?: number, + /** + * Apple TV parallax effects + */ + tvParallaxProperties?: Object, + }; + + declare export class TouchableOpacity extends React$Component { + static defaultProps: { + activeOpacity: 0.2, + focusedOpacity: 0.7, + }; + blur(): void, + focus(): void, + measure(callback: MeasureOnSuccessCallback): void, + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void, + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail: () => void, + ): void, + setNativeProps(nativeProps: TouchableOpacityProps): void, + } + + declare type TouchableHighlightProps = { + ...TouchableWithoutFeedbackProps, + /** + * Determines what the opacity of the wrapped view should be when touch is + * active. + */ + activeOpacity?: number, + /** + * The color of the underlay that will show through when the touch is + * active. + */ + underlayColor?: Color, + style?: StyleProp, + /** + * Called immediately after the underlay is shown + */ + onShowUnderlay?: Function, + /** + * Called immediately after the underlay is hidden + */ + onHideUnderlay?: Function, + /** + * *(Apple TV only)* TV preferred focus (see documentation for the View component). + * + * @platform ios + */ + hasTVPreferredFocus?: boolean, + /** + * *(Apple TV only)* Object with properties to control Apple TV parallax effects. + * + * enabled: If true, parallax effects are enabled. Defaults to true. + * shiftDistanceX: Defaults to 2.0. + * shiftDistanceY: Defaults to 2.0. + * tiltAngle: Defaults to 0.05. + * magnification: Defaults to 1.0. + * + * @platform ios + */ + tvParallaxProperties?: Object, + }; + + declare export class TouchableHighlight extends React$Component { + static defaultProps: { + activeOpacity: 0.85, + underlayColor: 'black', + }; + blur(): void, + focus(): void, + measure(callback: MeasureOnSuccessCallback): void, + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void, + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail: () => void, + ): void, + setNativeProps(nativeProps: TouchableHighlightProps): void, + } + + declare type TouchableNativeFeedbackProps = { + ...TouchableWithoutFeedbackProps, + /** + * Determines the type of background drawable that's going to be used to + * display feedback. It takes an object with `type` property and extra data + * depending on the `type`. It's recommended to use one of the static + * methods to generate that dictionary. + */ + background: { + type: 'RippleAndroid', + color?: number, + borderless?: boolean, + } | { + type: 'ThemeAttrAndroid', + attribute: string, + }, + + /** + * Set to true to add the ripple effect to the foreground of the view, instead of the + * background. This is useful if one of your child views has a background of its own, or you're + * e.g. displaying images, and you don't want the ripple to be covered by them. + * + * Check TouchableNativeFeedback.canUseNativeForeground() first, as this is only available on + * Android 6.0 and above. If you try to use this on older versions you will get a warning and + * fallback to background. + */ + useForeground?: boolean, + }; + + declare export class TouchableNativeFeedback extends React$Component { + static defaultProps: { + activeOpacity: 0.85, + underlayColor: 'black', + }; + /** + * Creates an object that represents android theme's default background for + * selectable elements (?android:attr/selectableItemBackground). + */ + static SelectableBackground(): { + type: 'ThemeAttrAndroid', + attribute: 'selectableItemBackground' + }, + /** + * Creates an object that represent android theme's default background for borderless + * selectable elements (?android:attr/selectableItemBackgroundBorderless). + * Available on android API level 21+. + */ + static SelectableBackgroundBorderless(): { + type: 'ThemeAttrAndroid', + attribute: 'selectableItemBackgroundBorderless', + }, + /** + * Creates an object that represents ripple drawable with specified color (as a + * string). If property `borderless` evaluates to true the ripple will + * render outside of the view bounds (see native actionbar buttons as an + * example of that behavior). This background type is available on Android + * API level 21+. + * + * @param color The ripple color + * @param borderless If the ripple can render outside it's bounds + */ + static Ripple(color: string, borderless: boolean): { + type: 'RippleAndroid', + color: number, + borderless: boolean, + }, + static canUseNativeForeground(): boolean, + blur(): void, + focus(): void, + measure(callback: MeasureOnSuccessCallback): void, + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void, + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail: () => void, + ): void, + setNativeProps(nativeProps: TouchableNativeFeedbackProps): void, + } + + + declare class ListViewDataSource { + /** + * You can provide custom extraction and `hasChanged` functions for section + * headers and rows. If absent, data will be extracted with the + * `defaultGetRowData` and `defaultGetSectionHeaderData` functions. + * + * The default extractor expects data of one of the following forms: + * + * { sectionID_1: { rowID_1: , ... }, ... } + * + * or + * + * { sectionID_1: [ , , ... ], ... } + * + * or + * + * [ [ , , ... ], ... ] + * + * The constructor takes in a params argument that can contain any of the + * following: + * + * - getRowData(dataBlob, sectionID, rowID); + * - getSectionHeaderData(dataBlob, sectionID); + * - rowHasChanged(prevRowData, nextRowData); + * - sectionHeaderHasChanged(prevSectionData, nextSectionData); + */ + constructor(params: ParamType): void, + + /** + * Clones this `ListViewDataSource` with the specified `dataBlob` and + * `rowIdentities`. The `dataBlob` is just an arbitrary blob of data. At + * construction an extractor to get the interesting information was defined + * (or the default was used). + * + * The `rowIdentities` is a 2D array of identifiers for rows. + * ie. [['a1', 'a2'], ['b1', 'b2', 'b3'], ...]. If not provided, it's + * assumed that the keys of the section data are the row identities. + * + * Note: This function does NOT clone the data in this data source. It simply + * passes the functions defined at construction to a new data source with + * the data specified. If you wish to maintain the existing data you must + * handle merging of old and new data separately and then pass that into + * this function as the `dataBlob`. + */ + cloneWithRows( + dataBlob: $ReadOnlyArray | {+[key: string]: any}, + rowIdentities: ?$ReadOnlyArray + ): ListViewDataSource, + + /** + * This performs the same function as the `cloneWithRows` function but here + * you also specify what your `sectionIdentities` are. If you don't care + * about sections you should safely be able to use `cloneWithRows`. + * + * `sectionIdentities` is an array of identifiers for sections. + * ie. ['s1', 's2', ...]. If not provided, it's assumed that the + * keys of dataBlob are the section identities. + * + * Note: this returns a new object! + */ + cloneWithRowsAndSections( + dataBlob: any, + sectionIdentities: ?Array, + rowIdentities: ?Array> + ): ListViewDataSource, + + getRowCount(): number, + + getRowAndSectionCount(): number, + + /** + * Returns if the row is dirtied and needs to be rerendered + */ + rowShouldUpdate(sectionIndex: number, rowIndex: number): boolean, + + /** + * Gets the data required to render the row. + */ + getRowData(sectionIndex: number, rowIndex: number): any, + + /** + * Gets the rowID at index provided if the dataSource arrays were flattened, + * or null of out of range indexes. + */ + getRowIDForFlatIndex(index: number): ?string, + + /** + * Gets the sectionID at index provided if the dataSource arrays were flattened, + * or null for out of range indexes. + */ + getSectionIDForFlatIndex(index: number): ?string, + + /** + * Returns an array containing the number of rows in each section + */ + getSectionLengths(): Array, + + /** + * Returns if the section header is dirtied and needs to be rerendered + */ + sectionHeaderShouldUpdate(sectionIndex: number): boolean, + + /** + * Gets the data required to render the section header + */ + getSectionHeaderData(sectionIndex: number): any, + } + + + + declare type ListViewProps = { + ...ScrollViewProps, + /** + * An instance of [ListView.DataSource](docs/listviewdatasource.html) to use + */ + dataSource: ListViewDataSource, + /** + * (sectionID, rowID, adjacentRowHighlighted) => renderable + * + * If provided, a renderable component to be rendered as the separator + * below each row but not the last row if there is a section header below. + * Take a sectionID and rowID of the row above and whether its adjacent row + * is highlighted. + */ + renderSeparator?: Function, + /** + * (rowData, sectionID, rowID, highlightRow) => renderable + * + * Takes a data entry from the data source and its ids and should return + * a renderable component to be rendered as the row. By default the data + * is exactly what was put into the data source, but it's also possible to + * provide custom extractors. ListView can be notified when a row is + * being highlighted by calling `highlightRow(sectionID, rowID)`. This + * sets a boolean value of adjacentRowHighlighted in renderSeparator, allowing you + * to control the separators above and below the highlighted row. The highlighted + * state of a row can be reset by calling highlightRow(null). + */ + renderRow: Function, + /** + * How many rows to render on initial component mount. Use this to make + * it so that the first screen worth of data appears at one time instead of + * over the course of multiple frames. + */ + initialListSize?: number, + /** + * Called when all rows have been rendered and the list has been scrolled + * to within onEndReachedThreshold of the bottom. The native scroll + * event is provided. + */ + onEndReached?: Function, + /** + * Threshold in pixels (virtual, not physical) for calling onEndReached. + */ + onEndReachedThreshold?: number, + /** + * Number of rows to render per event loop. Note: if your 'rows' are actually + * cells, i.e. they don't span the full width of your view (as in the + * ListViewGridLayoutExample), you should set the pageSize to be a multiple + * of the number of cells per row, otherwise you're likely to see gaps at + * the edge of the ListView as new pages are loaded. + */ + pageSize?: number, + /** + * () => renderable + * + * The header and footer are always rendered (if these props are provided) + * on every render pass. If they are expensive to re-render, wrap them + * in StaticContainer or other mechanism as appropriate. Footer is always + * at the bottom of the list, and header at the top, on every render pass. + */ + renderFooter?: Function, + renderHeader?: Function, + /** + * (sectionData, sectionID) => renderable + * + * If provided, a header is rendered for this section. + */ + renderSectionHeader?: Function, + /** + * (props) => renderable + * + * A function that returns the scrollable component in which the list rows + * are rendered. Defaults to returning a ScrollView with the given props. + */ + renderScrollComponent?: Function, + /** + * How early to start rendering rows before they come on screen, in + * pixels. + */ + scrollRenderAheadDistance?: number, + /** + * (visibleRows, changedRows) => void + * + * Called when the set of visible rows changes. `visibleRows` maps + * { sectionID: { rowID: true }} for all the visible rows, and + * `changedRows` maps { sectionID: { rowID: true | false }} for the rows + * that have changed their visibility, with true indicating visible, and + * false indicating the view has moved out of view. + */ + onChangeVisibleRows?: Function, + /** + * A performance optimization for improving scroll perf of + * large lists, used in conjunction with overflow: 'hidden' on the row + * containers. This is enabled by default. + */ + removeClippedSubviews?: boolean, + /** + * Makes the sections headers sticky. The sticky behavior means that it + * will scroll with the content at the top of the section until it reaches + * the top of the screen, at which point it will stick to the top until it + * is pushed off the screen by the next section header. This property is + * not supported in conjunction with `horizontal={true}`. Only enabled by + * default on iOS because of typical platform standards. + */ + stickySectionHeadersEnabled?: 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?: Array, + /** + * Flag indicating whether empty section headers should be rendered. In the future release + * empty section headers will be rendered by default, and the flag will be deprecated. + * If empty sections are not desired to be rendered their indices should be excluded from sectionID object. + */ + enableEmptySections?: boolean, + }; + + declare export class ListView extends React$Component { + static DataSource: Class, + /** + * Provides a handle to the underlying scroll responder. + * Note that `this._scrollComponent` might not be a `ScrollView`, so we + * need to check that it responds to `getScrollResponder` before calling it. + */ + getScrollResponder(): any, // TODO(lmr): ScrollResponder + getScrollableNode(): any, + + /** + * Scrolls to a given x, y offset, either immediately or with a smooth animation. + * + * See `ScrollView#scrollTo`. + */ + scrollTo(...args: Array): void, + + /** + * If this is a vertical ListView scrolls to the bottom. + * If this is a horizontal ListView scrolls to the right. + * + * Use `scrollToEnd({animated: true})` for smooth animated scrolling, + * `scrollToEnd({animated: false})` for immediate scrolling. + * If no options are passed, `animated` defaults to true. + * + * See `ScrollView#scrollToEnd`. + */ + scrollToEnd(options?: ?{ animated?: ?boolean }): void, + + setNativeProps(props: Object): void, + } + + declare type VirtualizedListItem = any; + + declare type renderItemType = (info: any) => ?React.Element; + + declare type RequiredVirtualizedListProps = { + renderItem: renderItemType, + /** + * The default accessor functions assume this is an Array<{key: string}> but you can override + * getItem, getItemCount, and keyExtractor to handle any type of index-based data. + */ + data?: any, + /** + * A generic accessor for extracting an item from any sort of data blob. + */ + getItem: (data: any, index: number) => ?VirtualizedListItem, + /** + * Determines how many items are in the data blob. + */ + getItemCount: (data: any) => number, + }; + + declare type OptionalVirtualizedListProps = { + /** + * `debug` will turn on extra logging and visual overlays to aid with debugging both usage and + * implementation, but with a significant perf hit. + */ + debug?: ?boolean, + /** + * DEPRECATED: Virtualization provides significant performance and memory optimizations, but fully + * unmounts react instances that are outside of the render window. You should only need to disable + * this for debugging purposes. + */ + disableVirtualization: boolean, + /** + * A marker property for telling the list to re-render (since it implements `PureComponent`). If + * any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the + * `data` prop, stick it here and treat it immutably. + */ + extraData?: any, + getItemLayout?: (data: any, index: number) => + {length: number, offset: number, index: number}, // e.g. height, y + horizontal?: ?boolean, + /** + * How many items to render in the initial batch. This should be enough to fill the screen but not + * much more. Note these items will never be unmounted as part of the windowed rendering in order + * to improve perceived performance of scroll-to-top actions. + */ + initialNumToRender: number, + /** + * Instead of starting at the top with the first item, start at `initialScrollIndex`. This + * disables the "scroll to top" optimization that keeps the first `initialNumToRender` items + * always rendered and immediately renders the items starting at this initial index. Requires + * `getItemLayout` to be implemented. + */ + initialScrollIndex?: ?number, + keyExtractor: (item: VirtualizedListItem, index: number) => string, + /** + * Rendered when the list is empty. Can be a React Component Class, a render function, or + * a rendered element. + */ + ListEmptyComponent?: ?(React$Class | React$Element), + /** + * Rendered at the bottom of all the items. Can be a React Component Class, a render function, or + * a rendered element. + */ + ListFooterComponent?: ?(React$Class | React$Element), + /** + * Rendered at the top of all the items. Can be a React Component Class, a render function, or + * a rendered element. + */ + ListHeaderComponent?: ?(React$Class | React$Element), + /** + * The maximum number of items to render in each incremental render batch. The more rendered at + * once, the better the fill rate, but responsiveness my suffer because rendering content may + * interfere with responding to button taps or other interactions. + */ + maxToRenderPerBatch: number, + onEndReached?: ?(info: {distanceFromEnd: number}) => void, + onEndReachedThreshold?: ?number, // units of visible length + onLayout?: ?Function, + /** + * If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make + * sure to also set the `refreshing` prop correctly. + */ + onRefresh?: ?Function, + /** + * Called when the viewability of rows changes, as defined by the + * `viewabilityConfig` prop. + */ + onViewableItemsChanged?: ?(info: { + viewableItems: Array, + changed: Array, + }) => void, + /** + * Set this true while waiting for new data from a refresh. + */ + refreshing?: ?boolean, + /** + * Note: may have bugs (missing content) in some circumstances - use at your own risk. + * + * This may improve scroll performance for large lists. + */ + removeClippedSubviews?: boolean, + /** + * Render a custom scroll component, e.g. with a differently styled `RefreshControl`. + */ + renderScrollComponent: (props: Object) => React$Element, + /** + * Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off + * screen. Similar fill rate/responsiveness tradeoff as `maxToRenderPerBatch`. + */ + updateCellsBatchingPeriod: number, + viewabilityConfig?: ViewabilityConfig, + /** + * Determines the maximum number of items rendered outside of the visible area, in units of + * visible lengths. So if your list fills the screen, then `windowSize={21}` (the default) will + * render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing + * this number will reduce memory consumption and may improve performance, but will increase the + * chance that fast scrolling may reveal momentary blank areas of unrendered content. + */ + windowSize: number, + }; + + declare type VirtualizedListProps = { + ...RequiredVirtualizedListProps, + ...OptionalVirtualizedListProps, + }; + + + declare class VirtualizedList extends React.PureComponent { + scrollToEnd(params?: ?{animated?: ?boolean}): void, + + // scrollToIndex may be janky without getItemLayout prop + scrollToIndex(params: { + animated?: ?boolean, index: number, viewOffset?: number, viewPosition?: number + }): void, + + // scrollToItem may be janky without getItemLayout prop. Required linear scan through items - + // use scrollToIndex instead if possible. + scrollToItem(params: {animated?: ?boolean, item: Item, viewPosition?: number}): void, + + scrollToOffset(params: {animated?: ?boolean, offset: number}): void, + + recordInteraction(): void, + + /** + * Provides a handle to the underlying scroll responder. + * Note that `this._scrollRef` might not be a `ScrollView`, so we + * need to check that it responds to `getScrollResponder` before calling it. + */ + getScrollResponder(): any, + + getScrollableNode(): any, + } + + + + declare type RequiredFlatListProps = { + /** + * Takes an item from `data` and renders it into the list. Example usage: + * + * ( + * + * )} + * data={[{title: 'Title Text', key: 'item1'}]} + * renderItem={({item, separators}) => ( + * this._onPress(item)} + * onShowUnderlay={separators.highlight} + * onHideUnderlay={separators.unhighlight}> + * + * {item.title}} + * + * + * )} + * /> + * + * Provides additional metadata like `index` if you need it, as well as a more generic + * `separators.updateProps` function which let's you set whatever props you want to change the + * rendering of either the leading separator or trailing separator in case the more common + * `highlight` and `unhighlight` (which set the `highlighted: boolean` prop) are insufficient for + * your use-case. + */ + renderItem: (info: { + item: ItemT, + index: number, + separators: { + highlight: () => void, + unhighlight: () => void, + updateProps: (select: 'leading' | 'trailing', newProps: Object) => void, + }, + }) => ?React.Element, + /** + * For simplicity, data is just a plain array. If you want to use something else, like an + * immutable list, use the underlying `VirtualizedList` directly. + */ + data: ?$ReadOnlyArray, + }; + declare type OptionalFlatListProps = { + /** + * Rendered in between each item, but not at the top or bottom. By default, `highlighted` and + * `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` + * which will update the `highlighted` prop, but you can also add custom props with + * `separators.updateProps`. + */ + ItemSeparatorComponent?: ?ReactClass, + /** + * Rendered when the list is empty. Can be a React Component Class, a render function, or + * a rendered element. + */ + ListEmptyComponent?: ?(ReactClass | React.Element), + /** + * Rendered at the bottom of all the items. Can be a React Component Class, a render function, or + * a rendered element. + */ + ListFooterComponent?: ?(ReactClass | React.Element), + /** + * Rendered at the top of all the items. Can be a React Component Class, a render function, or + * a rendered element. + */ + ListHeaderComponent?: ?(ReactClass | React.Element), + /** + * Optional custom style for multi-item rows generated when numColumns > 1. + */ + columnWrapperStyle?: StyleObj, + /** + * A marker property for telling the list to re-render (since it implements `PureComponent`). If + * any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the + * `data` prop, stick it here and treat it immutably. + */ + extraData?: any, + /** + * `getItemLayout` is an optional optimizations that let us skip measurement of dynamic content if + * you know the height of items a priori. `getItemLayout` is the most efficient, and is easy to + * use if you have fixed height items, for example: + * + * getItemLayout={(data, index) => ( + * {length: ITEM_HEIGHT, offset: ITEM_HEIGHT * index, index} + * )} + * + * Remember to include separator length (height or width) in your offset calculation if you + * specify `ItemSeparatorComponent`. + */ + getItemLayout?: (data: ?Array, index: number) => + {length: number, offset: number, index: number}, + /** + * If true, renders items next to each other horizontally instead of stacked vertically. + */ + horizontal?: ?boolean, + /** + * How many items to render in the initial batch. This should be enough to fill the screen but not + * much more. Note these items will never be unmounted as part of the windowed rendering in order + * to improve perceived performance of scroll-to-top actions. + */ + initialNumToRender: number, + /** + * Instead of starting at the top with the first item, start at `initialScrollIndex`. This + * disables the "scroll to top" optimization that keeps the first `initialNumToRender` items + * always rendered and immediately renders the items starting at this initial index. Requires + * `getItemLayout` to be implemented. + */ + initialScrollIndex?: ?number, + /** + * Used to extract a unique key for a given item at the specified index. Key is used for caching + * and as the react key to track item re-ordering. The default extractor checks `item.key`, then + * falls back to using the index, like React does. + */ + keyExtractor: (item: ItemT, index: number) => string, + /** + * Multiple columns can only be rendered with `horizontal={false}` and will zig-zag like a + * `flexWrap` layout. Items should all be the same height - masonry layouts are not supported. + */ + numColumns: number, + /** + * Called once when the scroll position gets within `onEndReachedThreshold` of the rendered + * content. + */ + onEndReached?: ?(info: {distanceFromEnd: number}) => void, + /** + * How far from the end (in units of visible length of the list) the bottom edge of the + * list must be from the end of the content to trigger the `onEndReached` callback. + * Thus a value of 0.5 will trigger `onEndReached` when the end of the content is + * within half the visible length of the list. + */ + onEndReachedThreshold?: ?number, + /** + * If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make + * sure to also set the `refreshing` prop correctly. + */ + onRefresh?: ?() => void, + /** + * Called when the viewability of rows changes, as defined by the `viewabilityConfig` prop. + */ + onViewableItemsChanged?: ?(info: { + viewableItems: Array, + changed: Array, + }) => void, + legacyImplementation?: ?boolean, + /** + * Set this true while waiting for new data from a refresh. + */ + refreshing?: ?boolean, + /** + * Note: may have bugs (missing content) in some circumstances - use at your own risk. + * + * This may improve scroll performance for large lists. + */ + removeClippedSubviews?: boolean, + /** + * See `ViewabilityHelper` for flow type and further documentation. + */ + viewabilityConfig?: ViewabilityConfig, + }; + + declare type FlatListProps = { + ...RequiredProps, + ...OptionalProps, + ...VirtualizedListProps, + }; + + declare export class FlatList extends React$Component, void> { + /** + * Scrolls to the end of the content. May be janky without `getItemLayout` prop. + */ + scrollToEnd(params?: ?{animated?: ?boolean}): void, + + /** + * Scrolls to the item at a the specified index such that it is positioned in the viewable area + * such that `viewPosition` 0 places it at the top, 1 at the bottom, and 0.5 centered in the + * middle. `viewOffset` is a fixed number of pixels to offset the final target position. + * + * Note: cannot scroll to locations outside the render window without specifying the + * `getItemLayout` prop. + */ + scrollToIndex(params: { + animated?: ?boolean, index: number, viewOffset?: number, viewPosition?: number, + }): void, + + /** + * Requires linear scan through data - use `scrollToIndex` instead if possible. + * + * Note: cannot scroll to locations outside the render window without specifying the + * `getItemLayout` prop. + */ + scrollToItem(params: {animated?: ?boolean, item: ItemT, viewPosition?: number}): void, + + /** + * Scroll to a specific content pixel offset, like a normal `ScrollView`. + */ + scrollToOffset(params: {animated?: ?boolean, offset: number}): void, + + /** + * Tells the list an interaction has occured, which should trigger viewability calculations, e.g. + * if `waitForInteractions` is true and the user has not scrolled. This is typically called by + * taps on items or by navigation actions. + */ + recordInteraction(): void, + + /** + * Provides a handle to the underlying scroll responder. + */ + getScrollResponder(): any, + + getScrollableNode(): any, + } + + declare export var AppState: {| + ...$Exact>, + currentState: ?string, + isAvailable: boolean, + /** + * Add a handler to AppState changes by listening to the `change` event type + * and providing the handler + * + * TODO: now that AppState is a subclass of NativeEventEmitter, we could deprecate + * `addEventListener` and `removeEventListener` and just use `addListener` and + * `listener.remove()` directly. That will be a breaking change though, as both + * the method and event names are different (addListener events are currently + * required to be globally unique). + */ + addEventListener(type: string, handler: Function): void, + + /** + * Remove a handler by passing the `change` event type and the handler + */ + removeEventListener(type: string, handler: Function): void, + |} + + declare export var DeviceEventEmitter: {| + ...$Exact>, + |} + + declare export var NativeEventEmitter: {| + ...$Exact>, + |} + + declare export var UIManager: {| + focus(reactTag: number): void, + blur(reactTag: number): void, + dispatchViewManagerCommand( + reactTag: number, + commandID, + commandArgs + ): void, + measure( + reactTag: number, + callback: MeasureOnSuccessCallback, + ): void, + measureLayout( + reactTag: number, + relativeTo: number, + errorCallback: () => void, + callback: MeasureLayoutOnSuccessCallback, + ): void, + measureLayoutRelativeToParent( + reactTag: number, + errorCallback: () => void, + callback: MeasureLayoutOnSuccessCallback + ): void, + measureViewsInRect( + rect: { + x: number, + y: number, + width: number, + height: number, + }, + parentView: number, + errorCallback: () => void, + callback: MeasureLayoutOnSuccessCallback + ): void, + |} + + declare export var Clipboard: {| + /** + * Get content of string type, this method returns a `Promise`, so you can use following code to get clipboard content + * ```javascript + * async _getContent() { + * var content = await Clipboard.getString(); + * } + * ``` + */ + getString(): Promise, + /** + * Set content of string type. You can use following code to set clipboard content + * ```javascript + * _setContent() { + * Clipboard.setString('hello world'); + * } + * ``` + * @param the content to be stored in the clipboard. + */ + setString(content: string): void, + |} + + declare export var NetInfo: {| + /** + * Invokes the listener whenever network status changes. + * The listener receives one of the connectivity types listed above. + */ + addEventListener( + eventName: ChangeEventName, + handler: Function + ): {remove: () => void}, + + /** + * Removes the listener for network status changes. + */ + removeEventListener( + eventName: ChangeEventName, + handler: Function + ): void, + + /** + * Returns a promise that resolves with one of the connectivity types listed + * above. + */ + fetch(): Promise, + + /** + * An object with the same methods as above but the listener receives a + * boolean which represents the internet connectivity. + * Use this if you are only interested with whether the device has internet + * connectivity. + */ + isConnected: { + addEventListener( + eventName: ChangeEventName, + handler: Function + ): {remove: () => void}, + + removeEventListener( + eventName: ChangeEventName, + handler: Function + ): void, + + fetch(): Promise, + }, + + isConnectionExpensive(): Promise, + |} + + declare type ComponentInterface = React$Class | { + name?: string, + displayName?: string, + propTypes: Object, + }; + + declare export function requireNativeComponent( + viewName: string, + componentInterface?: ?ComponentInterface, + extraConfig?: ?{nativeOnly?: Object}, + ): ReactClass | string; + + + declare type Task = (taskData: any) => Promise; + declare type TaskProvider = () => Task; + declare type ComponentProvider = () => React$Class; + declare type ComponentProviderInstrumentationHook = + (component: ComponentProvider) => React$Class; + declare type AppConfig = { + appKey: string, + component?: ComponentProvider, + run?: Function, + section?: boolean, + }; + declare type Runnable = { + component?: ComponentProvider, + run: Function, + }; + declare type Runnables = { + [appKey: string]: Runnable, + }; + declare type Registry = { + sections: Array, + runnables: Runnables, + }; + + declare export var AppRegistry: {| + registerConfig(config: Array): void, + + registerComponent( + appKey: string, + componentProvider: ComponentProvider, + section?: boolean, + ): string, + + registerRunnable(appKey: string, run: Function): string, + + registerSection(appKey: string, component: ComponentProvider): void, + + getAppKeys(): Array, + + getSectionKeys(): Array, + + getSections(): Runnables, + + getRunnable(appKey: string): ?Runnable, + + getRegistry(): Registry, + + setComponentProviderInstrumentationHook(hook: ComponentProviderInstrumentationHook): void, + + runApplication(appKey: string, appParameters: any): void, + + unmountApplicationComponentAtRootTag(rootTag: number): void, + + /** + * Register a headless task. A headless task is a bit of code that runs without a UI. + * @param taskKey the key associated with this task + * @param task a promise returning function that takes some data passed from the native side as + * the only argument; when the promise is resolved or rejected the native side is + * notified of this event and it may decide to destroy the JS context. + */ + registerHeadlessTask(taskKey: string, task: TaskProvider): void, + + /** + * Only called from native code. Starts a headless task. + * + * @param taskId the native id for this task instance to keep track of its execution + * @param taskKey the key for the task to start + * @param data the data to pass to the task + */ + startHeadlessTask(taskId: number, taskKey: string, data: any): void, + |} + + declare type ShareContent = { title?: string, message: string } | { title?: string, url: string }; + declare type ShareOptions = { dialogTitle?: string, excludeActivityTypes?: Array, tintColor?: string }; + + declare export var Share: {| + /** + * Open a dialog to share text content. + * + * In iOS, Returns a Promise which will be invoked an object containing `action`, `activityType`. + * If the user dismissed the dialog, the Promise will still be resolved with action being `Share.dismissedAction` + * and all the other keys being undefined. + * + * In Android, Returns a Promise which always be resolved with action being `Share.sharedAction`. + * + * ### Content + * + * - `message` - a message to share + * - `title` - title of the message + * + * #### iOS + * + * - `url` - an URL to share + * + * At least one of URL and message is required. + * + * ### Options + * + * #### iOS + * + * - `excludedActivityTypes` + * - `tintColor` + * + * #### Android + * + * - `dialogTitle` + * + */ + share(content: ShareContent, options: ShareOptions): Promise, + + /** + * The content was successfully shared. + */ + sharedAction: 'sharedAction', + + /** + * The dialog has been dismissed. + * @platform ios + */ + dismissedAction: 'dismissedAction' + |} + + declare type ActivityIndicatorProps = { + ...ViewProps, + /** + * Whether to show the indicator (true, the default) or hide it (false). + */ + animating?: boolean, + /** + * The foreground color of the spinner (default is gray). + */ + color?: Color, + /** + * Size of the indicator (default is 'small'). + * Passing a number to the size prop is only supported on Android. + */ + size?: 'small' | 'large' | number, + /** + * Whether the indicator should hide when not animating (true by default). + * + * @platform ios + */ + hidesWhenStopped?: boolean, + } + + declare export class ActivityIndicator extends React$Component { + blur(): void, + focus(): void, + measure(callback: MeasureOnSuccessCallback): void, + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void, + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail: () => void, + ): void, + setNativeProps(nativeProps: Object): void, + } + + declare type StatusBarStyle = $Enum<{ + /** + * Default status bar style (dark for iOS, light for Android) + */ + 'default': string, + /** + * Dark background, white texts and icons + */ + 'light-content': string, + /** + * Light background, dark texts and icons + */ + 'dark-content': string, + }>; + + /** + * Status bar animation + */ + declare type StatusBarAnimation = $Enum<{ + /** + * No animation + */ + 'none': string, + /** + * Fade animation + */ + 'fade': string, + /** + * Slide animation + */ + 'slide': string, + }>; + + declare type StatusBarProps = { + hidden?: boolean, + animated?: boolean, + backgroundColor?: Color, + translucent?: boolean, + barStyle?: StatusBarStyle, + networkActivityIndicatorVisible?: boolean, + showHideTransition?: 'fade' | 'slide', + } + + declare export class StatusBar extends React$Component { + static currentHeight: number, + + // Provide an imperative API as static functions of the component. + // See the corresponding prop for more detail. + + /** + * Show or hide the status bar + * @param hidden Hide the status bar. + * @param animation Optional animation when + * changing the status bar hidden property. + */ + static setHidden(hidden: boolean, animation?: StatusBarAnimation): void, + + /** + * Set the status bar style + * @param style Status bar style to set + * @param animated Animate the style change. + */ + static setBarStyle(style: StatusBarStyle, animated?: boolean): void, + + /** + * Control the visibility of the network activity indicator + * @param visible Show the indicator. + */ + static setNetworkActivityIndicatorVisible(visible: boolean): void, + + /** + * Set the background color for the status bar + * @param color Background color. + * @param animated Animate the style change. + */ + static setBackgroundColor(color: string, animated?: boolean): void, + + /** + * Control the translucency of the status bar + * @param translucent Set as translucent. + */ + static setTranslucent(translucent: boolean): void, + + } + + // declare export var View: any; + // declare export var StyleSheet: any; + // declare export var Text: any; + // declare export var Platform: any; + // declare export var TouchableOpacity: any; + // declare export var Image: any; + // declare export var Dimensions: any; + // declare export var ScrollView: any; + // declare export var Animated: any; // yes // TODO(lmr): View/Text/Image/ScrollView + // declare export var Alert: any; // yes + // declare export var TouchableHighlight: any; + // declare export var ActivityIndicator: any; + // declare export var TouchableWithoutFeedback: any; + // declare export var TextInput: any; // yes + // declare export var PixelRatio: any; // yes + // declare export var ListView: any; // yes + // declare export var StatusBar: any; + // declare export var Linking: any; // yes + // declare export var Keyboard: any; // yes + // declare export var LayoutAnimation: any; // yes + // declare export var AsyncStorage: any; // yes + // declare export var InteractionManager: any; // yes + // declare export var Easing: any; // yes + // declare export var TouchableNativeFeedback: any; + declare export var NativeModules: any; + declare export var Modal: any; + declare export var ColorPropType: any; + // declare export var AppState: any; // yes + declare export var RefreshControl: any; + declare export var KeyboardAvoidingView: any; + declare export var Picker: any; + declare export var ActionSheetIOS: any; + declare export var Navigator: any; + declare export var WebView: any; + // declare export var FlatList: any; // yes + // declare export var findNodeHandle: any; // yes + declare export var Switch: any; + // declare export var UIManager: any; // yes + // declare export var Clipboard: any; // yes + declare export var PanResponder: any; // yes + // declare export var NetInfo: any; // yes + declare export var BackAndroid: any; + // declare export var Share: any; // yes + declare export var NavigationExperimental: any; + declare export var CameraRoll: any; + declare export var Vibration: any; + declare export var PermissionsAndroid: any; + declare export var Slider: any; + declare export var AlertIOS: any; + // declare export var AppRegistry: any; // yes + declare export var PushNotificationIOS: any; + declare export var RenderingPerf: any; + declare export var Perf: any; + declare export var ToastAndroid: any; + declare export var RecyclerViewBackedScrollView: any; + declare export var SectionList: any; + declare export var DatePickerIOS: any; + declare export var ART: any; + // declare export var requireNativeComponent: any; // yes + // declare export var DeviceEventEmitter: any; // yes + declare export var BackHandler: any; + // declare export var NativeEventEmitter: any; // yes + declare export var Touchable: any; + declare export var ProgressViewIOS: any; + declare export var I18nManager: any; + declare export var SwipeableListView: any; + // declare export var processColor: any; + declare export var VibrationIOS: any; + declare export var DatePickerAndroid: any; + declare export var TimePickerAndroid: any; +} From c2c81d95f6bce33479e8cc54ccf28a1e424e6826 Mon Sep 17 00:00:00 2001 From: Adam Miskiewicz Date: Mon, 3 Jul 2017 14:59:21 -0700 Subject: [PATCH 05/24] Update flow-typed defs --- .flowconfig | 15 +- flow-typed/npm/babel-cli_vx.x.x.js | 8 +- flow-typed/npm/babel-core_vx.x.x.js | 43 +- flow-typed/npm/babel-eslint_vx.x.x.js | 15 +- flow-typed/npm/babel-jest_vx.x.x.js | 8 +- ...abel-plugin-flow-react-proptypes_vx.x.x.js | 53 + flow-typed/npm/babel-preset-es2015_vx.x.x.js | 8 +- ...abel-preset-react-native-stage-0_vx.x.x.js | 38 + ...babel-preset-react-native-syntax_vx.x.x.js | 8 +- .../npm/babel-preset-react-native_vx.x.x.js | 8 +- flow-typed/npm/babel-preset-react_vx.x.x.js | 8 +- flow-typed/npm/babel-preset-stage-1_vx.x.x.js | 8 +- flow-typed/npm/clamp_vx.x.x.js | 8 +- flow-typed/npm/codecov_vx.x.x.js | 276 +++ .../npm/eslint-config-prettier_vx.x.x.js | 59 + .../npm/eslint-plugin-flowtype_vx.x.x.js | 15 +- flow-typed/npm/eslint-plugin-import_vx.x.x.js | 106 +- .../npm/eslint-plugin-jsx-a11y_vx.x.x.js | 867 ++++++-- .../npm/eslint-plugin-prettier_vx.x.x.js | 46 + flow-typed/npm/eslint-plugin-react_vx.x.x.js | 56 +- flow-typed/npm/eslint_vx.x.x.js | 154 +- .../npm/hoist-non-react-statics_vx.x.x.js | 33 + .../npm/{jest_v17.x.x.js => jest_v20.x.x.js} | 189 +- flow-typed/npm/path-to-regexp_vx.x.x.js | 33 + flow-typed/npm/prettier-eslint_vx.x.x.js | 39 + flow-typed/npm/prettier_vx.x.x.js | 157 ++ flow-typed/npm/prop-types_v15.x.x.js | 34 + ...ct-native-drawer-layout-polyfill_vx.x.x.js | 39 + .../npm/react-native-tab-view_vx.x.x.js | 95 + .../npm/react-native-vector-icons_vx.x.x.js | 185 ++ flow-typed/npm/react-test-renderer_vx.x.x.js | 1760 +++++++++++++++++ 31 files changed, 3995 insertions(+), 376 deletions(-) create mode 100644 flow-typed/npm/babel-plugin-flow-react-proptypes_vx.x.x.js create mode 100644 flow-typed/npm/babel-preset-react-native-stage-0_vx.x.x.js create mode 100644 flow-typed/npm/codecov_vx.x.x.js create mode 100644 flow-typed/npm/eslint-config-prettier_vx.x.x.js create mode 100644 flow-typed/npm/eslint-plugin-prettier_vx.x.x.js create mode 100644 flow-typed/npm/hoist-non-react-statics_vx.x.x.js rename flow-typed/npm/{jest_v17.x.x.js => jest_v20.x.x.js} (71%) create mode 100644 flow-typed/npm/path-to-regexp_vx.x.x.js create mode 100644 flow-typed/npm/prettier-eslint_vx.x.x.js create mode 100644 flow-typed/npm/prettier_vx.x.x.js create mode 100644 flow-typed/npm/prop-types_v15.x.x.js create mode 100644 flow-typed/npm/react-native-drawer-layout-polyfill_vx.x.x.js create mode 100644 flow-typed/npm/react-native-tab-view_vx.x.x.js create mode 100644 flow-typed/npm/react-native-vector-icons_vx.x.x.js create mode 100644 flow-typed/npm/react-test-renderer_vx.x.x.js diff --git a/.flowconfig b/.flowconfig index e808a8e..ddac272 100644 --- a/.flowconfig +++ b/.flowconfig @@ -21,12 +21,10 @@ ; Ignore misc packages .*/node_modules/eslint-.* +.*/node_modules/react-native-tab-view/.* -; Ignore duplicate module providers -; For RN Apps installed via npm, "Libraries" folder is inside -; "node_modules/react-native" but in the source repo it is in the root -.*/node_modules/react-native/Libraries/react-native/React.js -.*/node_modules/react-native/Libraries/react-native/ReactNative.js +; Ignore react-native +.*/node_modules/react-native/.* /lib /lib-rn @@ -35,9 +33,6 @@ [include] [libs] -node_modules/react-native/Libraries/react-native/react-native-interface.js -node_modules/react-native/flow/ -flow/ [options] module.system=haste @@ -47,6 +42,10 @@ experimental.strict_type_args=true munge_underscores=true module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' +module.file_ext=.js +module.file_ext=.jsx +module.file_ext=.json +module.file_ext=.native.js suppress_type=$FlowIssue suppress_type=$FlowFixMe diff --git a/flow-typed/npm/babel-cli_vx.x.x.js b/flow-typed/npm/babel-cli_vx.x.x.js index bb6ffc5..63901e5 100644 --- a/flow-typed/npm/babel-cli_vx.x.x.js +++ b/flow-typed/npm/babel-cli_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: b1c74048f05b9f11f9179ceca00117e2 -// flow-typed version: <>/babel-cli_v^6.18.0/flow_v0.37.0 +// flow-typed signature: 50cccc4d25daa131ce5273d84f010572 +// flow-typed version: <>/babel-cli_v^6.24.1/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/babel-core_vx.x.x.js b/flow-typed/npm/babel-core_vx.x.x.js index 7810287..a7f0838 100644 --- a/flow-typed/npm/babel-core_vx.x.x.js +++ b/flow-typed/npm/babel-core_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: b0378db1d784937726ae12c16aa220bf -// flow-typed version: <>/babel-core_v^6.18.2/flow_v0.37.0 +// flow-typed signature: b44c78d7279f78b485d76b15c08cd683 +// flow-typed version: <>/babel-core_v^6.24.1/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ @@ -30,6 +30,14 @@ declare module 'babel-core/lib/api/node' { declare module.exports: any; } +declare module 'babel-core/lib/helpers/get-possible-plugin-names' { + declare module.exports: any; +} + +declare module 'babel-core/lib/helpers/get-possible-preset-names' { + declare module.exports: any; +} + declare module 'babel-core/lib/helpers/merge' { declare module.exports: any; } @@ -38,6 +46,18 @@ declare module 'babel-core/lib/helpers/normalize-ast' { declare module.exports: any; } +declare module 'babel-core/lib/helpers/resolve-from-possible-names' { + declare module.exports: any; +} + +declare module 'babel-core/lib/helpers/resolve-plugin' { + declare module.exports: any; +} + +declare module 'babel-core/lib/helpers/resolve-preset' { + declare module.exports: any; +} + declare module 'babel-core/lib/helpers/resolve' { declare module.exports: any; } @@ -127,12 +147,27 @@ declare module 'babel-core/lib/api/browser.js' { declare module 'babel-core/lib/api/node.js' { declare module.exports: $Exports<'babel-core/lib/api/node'>; } +declare module 'babel-core/lib/helpers/get-possible-plugin-names.js' { + declare module.exports: $Exports<'babel-core/lib/helpers/get-possible-plugin-names'>; +} +declare module 'babel-core/lib/helpers/get-possible-preset-names.js' { + declare module.exports: $Exports<'babel-core/lib/helpers/get-possible-preset-names'>; +} declare module 'babel-core/lib/helpers/merge.js' { declare module.exports: $Exports<'babel-core/lib/helpers/merge'>; } declare module 'babel-core/lib/helpers/normalize-ast.js' { declare module.exports: $Exports<'babel-core/lib/helpers/normalize-ast'>; } +declare module 'babel-core/lib/helpers/resolve-from-possible-names.js' { + declare module.exports: $Exports<'babel-core/lib/helpers/resolve-from-possible-names'>; +} +declare module 'babel-core/lib/helpers/resolve-plugin.js' { + declare module.exports: $Exports<'babel-core/lib/helpers/resolve-plugin'>; +} +declare module 'babel-core/lib/helpers/resolve-preset.js' { + declare module.exports: $Exports<'babel-core/lib/helpers/resolve-preset'>; +} declare module 'babel-core/lib/helpers/resolve.js' { declare module.exports: $Exports<'babel-core/lib/helpers/resolve'>; } diff --git a/flow-typed/npm/babel-eslint_vx.x.x.js b/flow-typed/npm/babel-eslint_vx.x.x.js index fde535b..0ad3949 100644 --- a/flow-typed/npm/babel-eslint_vx.x.x.js +++ b/flow-typed/npm/babel-eslint_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 1c9bec8ce6fd389e61c1c246d35bb7c5 -// flow-typed version: <>/babel-eslint_v^7.0.0/flow_v0.37.0 +// flow-typed signature: 1bf74b25fb82cd002e8b966a31086e1a +// flow-typed version: <>/babel-eslint_v^7.2.3/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ @@ -26,6 +26,10 @@ declare module 'babel-eslint/babylon-to-espree/attachComments' { declare module.exports: any; } +declare module 'babel-eslint/babylon-to-espree/convertComments' { + declare module.exports: any; +} + declare module 'babel-eslint/babylon-to-espree/convertTemplateType' { declare module.exports: any; } @@ -50,6 +54,9 @@ declare module 'babel-eslint/babylon-to-espree/toTokens' { declare module 'babel-eslint/babylon-to-espree/attachComments.js' { declare module.exports: $Exports<'babel-eslint/babylon-to-espree/attachComments'>; } +declare module 'babel-eslint/babylon-to-espree/convertComments.js' { + declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertComments'>; +} declare module 'babel-eslint/babylon-to-espree/convertTemplateType.js' { declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertTemplateType'>; } diff --git a/flow-typed/npm/babel-jest_vx.x.x.js b/flow-typed/npm/babel-jest_vx.x.x.js index 13f286e..cc777fc 100644 --- a/flow-typed/npm/babel-jest_vx.x.x.js +++ b/flow-typed/npm/babel-jest_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 857bbea11904991ace904e4eb98bb2af -// flow-typed version: <>/babel-jest_v^17.0.2/flow_v0.37.0 +// flow-typed signature: 02359da7064195804e62c853de1fc44e +// flow-typed version: <>/babel-jest_v^20.0.1/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/babel-plugin-flow-react-proptypes_vx.x.x.js b/flow-typed/npm/babel-plugin-flow-react-proptypes_vx.x.x.js new file mode 100644 index 0000000..0ac31c0 --- /dev/null +++ b/flow-typed/npm/babel-plugin-flow-react-proptypes_vx.x.x.js @@ -0,0 +1,53 @@ +// flow-typed signature: c062ec7795b0fd3de749c140ded3d740 +// flow-typed version: <>/babel-plugin-flow-react-proptypes_v^2.2.1/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'babel-plugin-flow-react-proptypes' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'babel-plugin-flow-react-proptypes' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ +declare module 'babel-plugin-flow-react-proptypes/lib/convertToPropTypes' { + declare module.exports: any; +} + +declare module 'babel-plugin-flow-react-proptypes/lib/index' { + declare module.exports: any; +} + +declare module 'babel-plugin-flow-react-proptypes/lib/makePropTypesAst' { + declare module.exports: any; +} + +declare module 'babel-plugin-flow-react-proptypes/lib/util' { + declare module.exports: any; +} + +// Filename aliases +declare module 'babel-plugin-flow-react-proptypes/lib/convertToPropTypes.js' { + declare module.exports: $Exports<'babel-plugin-flow-react-proptypes/lib/convertToPropTypes'>; +} +declare module 'babel-plugin-flow-react-proptypes/lib/index.js' { + declare module.exports: $Exports<'babel-plugin-flow-react-proptypes/lib/index'>; +} +declare module 'babel-plugin-flow-react-proptypes/lib/makePropTypesAst.js' { + declare module.exports: $Exports<'babel-plugin-flow-react-proptypes/lib/makePropTypesAst'>; +} +declare module 'babel-plugin-flow-react-proptypes/lib/util.js' { + declare module.exports: $Exports<'babel-plugin-flow-react-proptypes/lib/util'>; +} diff --git a/flow-typed/npm/babel-preset-es2015_vx.x.x.js b/flow-typed/npm/babel-preset-es2015_vx.x.x.js index 382c87c7..b1afb73 100644 --- a/flow-typed/npm/babel-preset-es2015_vx.x.x.js +++ b/flow-typed/npm/babel-preset-es2015_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 6bc70afacfe0b49915c0557886b866c0 -// flow-typed version: <>/babel-preset-es2015_v^6.18.0/flow_v0.37.0 +// flow-typed signature: 245300d27bbcd9eed2c688a7d1073392 +// flow-typed version: <>/babel-preset-es2015_v^6.24.1/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/babel-preset-react-native-stage-0_vx.x.x.js b/flow-typed/npm/babel-preset-react-native-stage-0_vx.x.x.js new file mode 100644 index 0000000..a96355b --- /dev/null +++ b/flow-typed/npm/babel-preset-react-native-stage-0_vx.x.x.js @@ -0,0 +1,38 @@ +// flow-typed signature: 85f35727e0cc7a372bd958ff80f08110 +// flow-typed version: <>/babel-preset-react-native-stage-0_v^1.0.1/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'babel-preset-react-native-stage-0' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'babel-preset-react-native-stage-0' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ +declare module 'babel-preset-react-native-stage-0/decorator-support' { + declare module.exports: any; +} + +// Filename aliases +declare module 'babel-preset-react-native-stage-0/decorator-support.js' { + declare module.exports: $Exports<'babel-preset-react-native-stage-0/decorator-support'>; +} +declare module 'babel-preset-react-native-stage-0/index' { + declare module.exports: $Exports<'babel-preset-react-native-stage-0'>; +} +declare module 'babel-preset-react-native-stage-0/index.js' { + declare module.exports: $Exports<'babel-preset-react-native-stage-0'>; +} diff --git a/flow-typed/npm/babel-preset-react-native-syntax_vx.x.x.js b/flow-typed/npm/babel-preset-react-native-syntax_vx.x.x.js index 14cc22d..b960746 100644 --- a/flow-typed/npm/babel-preset-react-native-syntax_vx.x.x.js +++ b/flow-typed/npm/babel-preset-react-native-syntax_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: f81837494149f0b7e37e2dea1e774496 -// flow-typed version: <>/babel-preset-react-native-syntax_v^1.0.0/flow_v0.37.0 +// flow-typed signature: ad52b8fa9995651201720389a0746966 +// flow-typed version: <>/babel-preset-react-native-syntax_v^1.0.0/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/babel-preset-react-native_vx.x.x.js b/flow-typed/npm/babel-preset-react-native_vx.x.x.js index e16399d..1fba395 100644 --- a/flow-typed/npm/babel-preset-react-native_vx.x.x.js +++ b/flow-typed/npm/babel-preset-react-native_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 2ac38a3f71516b7f69ed258dc00ec7d6 -// flow-typed version: <>/babel-preset-react-native_v^1.9.0/flow_v0.37.0 +// flow-typed signature: b132a45b70b401796d625d8180574c91 +// flow-typed version: <>/babel-preset-react-native_v^1.9.2/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/babel-preset-react_vx.x.x.js b/flow-typed/npm/babel-preset-react_vx.x.x.js index 4f13de3..675f23f 100644 --- a/flow-typed/npm/babel-preset-react_vx.x.x.js +++ b/flow-typed/npm/babel-preset-react_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: dea3aea052d70d190e83a8fd2ceac38e -// flow-typed version: <>/babel-preset-react_v^6.16.0/flow_v0.37.0 +// flow-typed signature: 56127a0e27b24bbabb45b01aa4c6768a +// flow-typed version: <>/babel-preset-react_v^6.24.1/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/babel-preset-stage-1_vx.x.x.js b/flow-typed/npm/babel-preset-stage-1_vx.x.x.js index 70471db..3fdb156 100644 --- a/flow-typed/npm/babel-preset-stage-1_vx.x.x.js +++ b/flow-typed/npm/babel-preset-stage-1_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 5af7dc07b1c2948498099def76a10fce -// flow-typed version: <>/babel-preset-stage-1_v^6.16.0/flow_v0.37.0 +// flow-typed signature: 76ca3ede38f503bec8f3b45f45389773 +// flow-typed version: <>/babel-preset-stage-1_v^6.24.1/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/clamp_vx.x.x.js b/flow-typed/npm/clamp_vx.x.x.js index 739f12d..0d9cae4 100644 --- a/flow-typed/npm/clamp_vx.x.x.js +++ b/flow-typed/npm/clamp_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 618cc1f52320db6c303091d22222169b -// flow-typed version: <>/clamp_v^1.0.1/flow_v0.37.0 +// flow-typed signature: 8133090576c61cecf16348212e5ebd02 +// flow-typed version: <>/clamp_v^1.0.1/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/codecov_vx.x.x.js b/flow-typed/npm/codecov_vx.x.x.js new file mode 100644 index 0000000..e331410 --- /dev/null +++ b/flow-typed/npm/codecov_vx.x.x.js @@ -0,0 +1,276 @@ +// flow-typed signature: ad1840bbbf16a47effbbfa3f63f45a8d +// flow-typed version: <>/codecov_v^2.2.0/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'codecov' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'codecov' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ +declare module 'codecov/lib/codecov' { + declare module.exports: any; +} + +declare module 'codecov/lib/detect' { + declare module.exports: any; +} + +declare module 'codecov/lib/git' { + declare module.exports: any; +} + +declare module 'codecov/lib/offline' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/appveyor' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/buildkite' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/circle' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/codeship' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/drone' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/gitlab' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/jenkins' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/localGit' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/semaphore' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/shippable' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/snap' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/travis' { + declare module.exports: any; +} + +declare module 'codecov/lib/services/wercker' { + declare module.exports: any; +} + +declare module 'codecov/test/detect' { + declare module.exports: any; +} + +declare module 'codecov/test/git' { + declare module.exports: any; +} + +declare module 'codecov/test/index' { + declare module.exports: any; +} + +declare module 'codecov/test/services/appveyor' { + declare module.exports: any; +} + +declare module 'codecov/test/services/buildkite' { + declare module.exports: any; +} + +declare module 'codecov/test/services/circle' { + declare module.exports: any; +} + +declare module 'codecov/test/services/codeship' { + declare module.exports: any; +} + +declare module 'codecov/test/services/drone' { + declare module.exports: any; +} + +declare module 'codecov/test/services/gitlab' { + declare module.exports: any; +} + +declare module 'codecov/test/services/jenkins' { + declare module.exports: any; +} + +declare module 'codecov/test/services/localGit' { + declare module.exports: any; +} + +declare module 'codecov/test/services/semaphore' { + declare module.exports: any; +} + +declare module 'codecov/test/services/shippable' { + declare module.exports: any; +} + +declare module 'codecov/test/services/snap' { + declare module.exports: any; +} + +declare module 'codecov/test/services/travis' { + declare module.exports: any; +} + +declare module 'codecov/test/services/wercker' { + declare module.exports: any; +} + +declare module 'codecov/test/upload' { + declare module.exports: any; +} + +declare module 'codecov/testinit' { + declare module.exports: any; +} + +// Filename aliases +declare module 'codecov/index' { + declare module.exports: $Exports<'codecov'>; +} +declare module 'codecov/index.js' { + declare module.exports: $Exports<'codecov'>; +} +declare module 'codecov/lib/codecov.js' { + declare module.exports: $Exports<'codecov/lib/codecov'>; +} +declare module 'codecov/lib/detect.js' { + declare module.exports: $Exports<'codecov/lib/detect'>; +} +declare module 'codecov/lib/git.js' { + declare module.exports: $Exports<'codecov/lib/git'>; +} +declare module 'codecov/lib/offline.js' { + declare module.exports: $Exports<'codecov/lib/offline'>; +} +declare module 'codecov/lib/services/appveyor.js' { + declare module.exports: $Exports<'codecov/lib/services/appveyor'>; +} +declare module 'codecov/lib/services/buildkite.js' { + declare module.exports: $Exports<'codecov/lib/services/buildkite'>; +} +declare module 'codecov/lib/services/circle.js' { + declare module.exports: $Exports<'codecov/lib/services/circle'>; +} +declare module 'codecov/lib/services/codeship.js' { + declare module.exports: $Exports<'codecov/lib/services/codeship'>; +} +declare module 'codecov/lib/services/drone.js' { + declare module.exports: $Exports<'codecov/lib/services/drone'>; +} +declare module 'codecov/lib/services/gitlab.js' { + declare module.exports: $Exports<'codecov/lib/services/gitlab'>; +} +declare module 'codecov/lib/services/jenkins.js' { + declare module.exports: $Exports<'codecov/lib/services/jenkins'>; +} +declare module 'codecov/lib/services/localGit.js' { + declare module.exports: $Exports<'codecov/lib/services/localGit'>; +} +declare module 'codecov/lib/services/semaphore.js' { + declare module.exports: $Exports<'codecov/lib/services/semaphore'>; +} +declare module 'codecov/lib/services/shippable.js' { + declare module.exports: $Exports<'codecov/lib/services/shippable'>; +} +declare module 'codecov/lib/services/snap.js' { + declare module.exports: $Exports<'codecov/lib/services/snap'>; +} +declare module 'codecov/lib/services/travis.js' { + declare module.exports: $Exports<'codecov/lib/services/travis'>; +} +declare module 'codecov/lib/services/wercker.js' { + declare module.exports: $Exports<'codecov/lib/services/wercker'>; +} +declare module 'codecov/test/detect.js' { + declare module.exports: $Exports<'codecov/test/detect'>; +} +declare module 'codecov/test/git.js' { + declare module.exports: $Exports<'codecov/test/git'>; +} +declare module 'codecov/test/index.js' { + declare module.exports: $Exports<'codecov/test/index'>; +} +declare module 'codecov/test/services/appveyor.js' { + declare module.exports: $Exports<'codecov/test/services/appveyor'>; +} +declare module 'codecov/test/services/buildkite.js' { + declare module.exports: $Exports<'codecov/test/services/buildkite'>; +} +declare module 'codecov/test/services/circle.js' { + declare module.exports: $Exports<'codecov/test/services/circle'>; +} +declare module 'codecov/test/services/codeship.js' { + declare module.exports: $Exports<'codecov/test/services/codeship'>; +} +declare module 'codecov/test/services/drone.js' { + declare module.exports: $Exports<'codecov/test/services/drone'>; +} +declare module 'codecov/test/services/gitlab.js' { + declare module.exports: $Exports<'codecov/test/services/gitlab'>; +} +declare module 'codecov/test/services/jenkins.js' { + declare module.exports: $Exports<'codecov/test/services/jenkins'>; +} +declare module 'codecov/test/services/localGit.js' { + declare module.exports: $Exports<'codecov/test/services/localGit'>; +} +declare module 'codecov/test/services/semaphore.js' { + declare module.exports: $Exports<'codecov/test/services/semaphore'>; +} +declare module 'codecov/test/services/shippable.js' { + declare module.exports: $Exports<'codecov/test/services/shippable'>; +} +declare module 'codecov/test/services/snap.js' { + declare module.exports: $Exports<'codecov/test/services/snap'>; +} +declare module 'codecov/test/services/travis.js' { + declare module.exports: $Exports<'codecov/test/services/travis'>; +} +declare module 'codecov/test/services/wercker.js' { + declare module.exports: $Exports<'codecov/test/services/wercker'>; +} +declare module 'codecov/test/upload.js' { + declare module.exports: $Exports<'codecov/test/upload'>; +} +declare module 'codecov/testinit.js' { + declare module.exports: $Exports<'codecov/testinit'>; +} diff --git a/flow-typed/npm/eslint-config-prettier_vx.x.x.js b/flow-typed/npm/eslint-config-prettier_vx.x.x.js new file mode 100644 index 0000000..8890a45 --- /dev/null +++ b/flow-typed/npm/eslint-config-prettier_vx.x.x.js @@ -0,0 +1,59 @@ +// flow-typed signature: 044aa455e3cc503e87e65ea25f1bcdb3 +// flow-typed version: <>/eslint-config-prettier_v^2.1.0/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'eslint-config-prettier' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'eslint-config-prettier' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ +declare module 'eslint-config-prettier/bin/cli' { + declare module.exports: any; +} + +declare module 'eslint-config-prettier/bin/validators' { + declare module.exports: any; +} + +declare module 'eslint-config-prettier/flowtype' { + declare module.exports: any; +} + +declare module 'eslint-config-prettier/react' { + declare module.exports: any; +} + +// Filename aliases +declare module 'eslint-config-prettier/bin/cli.js' { + declare module.exports: $Exports<'eslint-config-prettier/bin/cli'>; +} +declare module 'eslint-config-prettier/bin/validators.js' { + declare module.exports: $Exports<'eslint-config-prettier/bin/validators'>; +} +declare module 'eslint-config-prettier/flowtype.js' { + declare module.exports: $Exports<'eslint-config-prettier/flowtype'>; +} +declare module 'eslint-config-prettier/index' { + declare module.exports: $Exports<'eslint-config-prettier'>; +} +declare module 'eslint-config-prettier/index.js' { + declare module.exports: $Exports<'eslint-config-prettier'>; +} +declare module 'eslint-config-prettier/react.js' { + declare module.exports: $Exports<'eslint-config-prettier/react'>; +} diff --git a/flow-typed/npm/eslint-plugin-flowtype_vx.x.x.js b/flow-typed/npm/eslint-plugin-flowtype_vx.x.x.js index 94ada8b..2d819b8 100644 --- a/flow-typed/npm/eslint-plugin-flowtype_vx.x.x.js +++ b/flow-typed/npm/eslint-plugin-flowtype_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 4914ad491df1933b4a85389d0c85d168 -// flow-typed version: <>/eslint-plugin-flowtype_v^2.19.0/flow_v0.37.0 +// flow-typed signature: 90f17f28057c2d62823bc86eb02fdca6 +// flow-typed version: <>/eslint-plugin-flowtype_v^2.33.0/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ @@ -54,6 +54,10 @@ declare module 'eslint-plugin-flowtype/dist/rules/noPrimitiveConstructorTypes' { declare module.exports: any; } +declare module 'eslint-plugin-flowtype/dist/rules/noTypesMissingFileAnnotation' { + declare module.exports: any; +} + declare module 'eslint-plugin-flowtype/dist/rules/noWeakTypes' { declare module.exports: any; } @@ -215,6 +219,9 @@ declare module 'eslint-plugin-flowtype/dist/rules/noDupeKeys.js' { declare module 'eslint-plugin-flowtype/dist/rules/noPrimitiveConstructorTypes.js' { declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noPrimitiveConstructorTypes'>; } +declare module 'eslint-plugin-flowtype/dist/rules/noTypesMissingFileAnnotation.js' { + declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noTypesMissingFileAnnotation'>; +} declare module 'eslint-plugin-flowtype/dist/rules/noWeakTypes.js' { declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/noWeakTypes'>; } diff --git a/flow-typed/npm/eslint-plugin-import_vx.x.x.js b/flow-typed/npm/eslint-plugin-import_vx.x.x.js index 5ed3bda..e78c840 100644 --- a/flow-typed/npm/eslint-plugin-import_vx.x.x.js +++ b/flow-typed/npm/eslint-plugin-import_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 42a734ddd100a0e4a16c21c2fd5ebfc8 -// flow-typed version: <>/eslint-plugin-import_v^1.16.0/flow_v0.37.0 +// flow-typed signature: 648dd21b73dc794cbba83495010df3a7 +// flow-typed version: <>/eslint-plugin-import_v^2.2.0/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ @@ -38,6 +38,10 @@ declare module 'eslint-plugin-import/config/react' { declare module.exports: any; } +declare module 'eslint-plugin-import/config/recommended' { + declare module.exports: any; +} + declare module 'eslint-plugin-import/config/stage-0' { declare module.exports: any; } @@ -46,42 +50,18 @@ declare module 'eslint-plugin-import/config/warnings' { declare module.exports: any; } -declare module 'eslint-plugin-import/lib/core/declaredScope' { - declare module.exports: any; -} - -declare module 'eslint-plugin-import/lib/core/getExports' { - declare module.exports: any; -} - -declare module 'eslint-plugin-import/lib/core/hash' { - declare module.exports: any; -} - -declare module 'eslint-plugin-import/lib/core/ignore' { - declare module.exports: any; -} - declare module 'eslint-plugin-import/lib/core/importType' { declare module.exports: any; } -declare module 'eslint-plugin-import/lib/core/module-require' { - declare module.exports: any; -} - -declare module 'eslint-plugin-import/lib/core/parse' { - declare module.exports: any; -} - -declare module 'eslint-plugin-import/lib/core/resolve' { - declare module.exports: any; -} - declare module 'eslint-plugin-import/lib/core/staticRequire' { declare module.exports: any; } +declare module 'eslint-plugin-import/lib/ExportMap' { + declare module.exports: any; +} + declare module 'eslint-plugin-import/lib/importDeclaration' { declare module.exports: any; } @@ -102,6 +82,10 @@ declare module 'eslint-plugin-import/lib/rules/extensions' { declare module.exports: any; } +declare module 'eslint-plugin-import/lib/rules/first' { + declare module.exports: any; +} + declare module 'eslint-plugin-import/lib/rules/imports-first' { declare module.exports: any; } @@ -166,6 +150,10 @@ declare module 'eslint-plugin-import/lib/rules/no-named-as-default' { declare module.exports: any; } +declare module 'eslint-plugin-import/lib/rules/no-named-default' { + declare module.exports: any; +} + declare module 'eslint-plugin-import/lib/rules/no-namespace' { declare module.exports: any; } @@ -178,10 +166,18 @@ declare module 'eslint-plugin-import/lib/rules/no-restricted-paths' { declare module.exports: any; } +declare module 'eslint-plugin-import/lib/rules/no-unassigned-import' { + declare module.exports: any; +} + declare module 'eslint-plugin-import/lib/rules/no-unresolved' { declare module.exports: any; } +declare module 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax' { + declare module.exports: any; +} + declare module 'eslint-plugin-import/lib/rules/order' { declare module.exports: any; } @@ -190,6 +186,10 @@ declare module 'eslint-plugin-import/lib/rules/prefer-default-export' { declare module.exports: any; } +declare module 'eslint-plugin-import/lib/rules/unambiguous' { + declare module.exports: any; +} + declare module 'eslint-plugin-import/memo-parser/index' { declare module.exports: any; } @@ -207,39 +207,24 @@ declare module 'eslint-plugin-import/config/react-native.js' { declare module 'eslint-plugin-import/config/react.js' { declare module.exports: $Exports<'eslint-plugin-import/config/react'>; } +declare module 'eslint-plugin-import/config/recommended.js' { + declare module.exports: $Exports<'eslint-plugin-import/config/recommended'>; +} declare module 'eslint-plugin-import/config/stage-0.js' { declare module.exports: $Exports<'eslint-plugin-import/config/stage-0'>; } declare module 'eslint-plugin-import/config/warnings.js' { declare module.exports: $Exports<'eslint-plugin-import/config/warnings'>; } -declare module 'eslint-plugin-import/lib/core/declaredScope.js' { - declare module.exports: $Exports<'eslint-plugin-import/lib/core/declaredScope'>; -} -declare module 'eslint-plugin-import/lib/core/getExports.js' { - declare module.exports: $Exports<'eslint-plugin-import/lib/core/getExports'>; -} -declare module 'eslint-plugin-import/lib/core/hash.js' { - declare module.exports: $Exports<'eslint-plugin-import/lib/core/hash'>; -} -declare module 'eslint-plugin-import/lib/core/ignore.js' { - declare module.exports: $Exports<'eslint-plugin-import/lib/core/ignore'>; -} declare module 'eslint-plugin-import/lib/core/importType.js' { declare module.exports: $Exports<'eslint-plugin-import/lib/core/importType'>; } -declare module 'eslint-plugin-import/lib/core/module-require.js' { - declare module.exports: $Exports<'eslint-plugin-import/lib/core/module-require'>; -} -declare module 'eslint-plugin-import/lib/core/parse.js' { - declare module.exports: $Exports<'eslint-plugin-import/lib/core/parse'>; -} -declare module 'eslint-plugin-import/lib/core/resolve.js' { - declare module.exports: $Exports<'eslint-plugin-import/lib/core/resolve'>; -} declare module 'eslint-plugin-import/lib/core/staticRequire.js' { declare module.exports: $Exports<'eslint-plugin-import/lib/core/staticRequire'>; } +declare module 'eslint-plugin-import/lib/ExportMap.js' { + declare module.exports: $Exports<'eslint-plugin-import/lib/ExportMap'>; +} declare module 'eslint-plugin-import/lib/importDeclaration.js' { declare module.exports: $Exports<'eslint-plugin-import/lib/importDeclaration'>; } @@ -255,6 +240,9 @@ declare module 'eslint-plugin-import/lib/rules/export.js' { declare module 'eslint-plugin-import/lib/rules/extensions.js' { declare module.exports: $Exports<'eslint-plugin-import/lib/rules/extensions'>; } +declare module 'eslint-plugin-import/lib/rules/first.js' { + declare module.exports: $Exports<'eslint-plugin-import/lib/rules/first'>; +} declare module 'eslint-plugin-import/lib/rules/imports-first.js' { declare module.exports: $Exports<'eslint-plugin-import/lib/rules/imports-first'>; } @@ -303,6 +291,9 @@ declare module 'eslint-plugin-import/lib/rules/no-named-as-default-member.js' { declare module 'eslint-plugin-import/lib/rules/no-named-as-default.js' { declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-as-default'>; } +declare module 'eslint-plugin-import/lib/rules/no-named-default.js' { + declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-default'>; +} declare module 'eslint-plugin-import/lib/rules/no-namespace.js' { declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-namespace'>; } @@ -312,15 +303,24 @@ declare module 'eslint-plugin-import/lib/rules/no-nodejs-modules.js' { declare module 'eslint-plugin-import/lib/rules/no-restricted-paths.js' { declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-restricted-paths'>; } +declare module 'eslint-plugin-import/lib/rules/no-unassigned-import.js' { + declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-unassigned-import'>; +} declare module 'eslint-plugin-import/lib/rules/no-unresolved.js' { declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-unresolved'>; } +declare module 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js' { + declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-webpack-loader-syntax'>; +} declare module 'eslint-plugin-import/lib/rules/order.js' { declare module.exports: $Exports<'eslint-plugin-import/lib/rules/order'>; } declare module 'eslint-plugin-import/lib/rules/prefer-default-export.js' { declare module.exports: $Exports<'eslint-plugin-import/lib/rules/prefer-default-export'>; } +declare module 'eslint-plugin-import/lib/rules/unambiguous.js' { + declare module.exports: $Exports<'eslint-plugin-import/lib/rules/unambiguous'>; +} declare module 'eslint-plugin-import/memo-parser/index.js' { declare module.exports: $Exports<'eslint-plugin-import/memo-parser/index'>; } diff --git a/flow-typed/npm/eslint-plugin-jsx-a11y_vx.x.x.js b/flow-typed/npm/eslint-plugin-jsx-a11y_vx.x.x.js index 5394ab8..2ab74a0 100644 --- a/flow-typed/npm/eslint-plugin-jsx-a11y_vx.x.x.js +++ b/flow-typed/npm/eslint-plugin-jsx-a11y_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: e3d1ca87717c1d814a58c879c1841af1 -// flow-typed version: <>/eslint-plugin-jsx-a11y_v^2.2.2/flow_v0.37.0 +// flow-typed signature: cd96c828c0f93d6e79866822effacff7 +// flow-typed version: <>/eslint-plugin-jsx-a11y_v^5.0.1/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ @@ -22,14 +22,234 @@ declare module 'eslint-plugin-jsx-a11y' { * require those files directly. Feel free to delete any files that aren't * needed. */ +declare module 'eslint-plugin-jsx-a11y/__mocks__/genInteractives' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__mocks__/IdentifierMock' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__mocks__/JSXAttributeMock' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__mocks__/JSXElementMock' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__mocks__/JSXExpressionContainerMock' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/__util__/parserOptionsMapper' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/__util__/ruleOptionsMapperFactory' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/index-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/accessible-emoji-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/alt-text-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/anchor-has-content-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-activedescendant-has-tabindex-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-props-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-proptypes-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-role-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-unsupported-elements-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/click-events-have-key-events-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/heading-has-content-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/href-no-hash-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/html-has-lang-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/iframe-has-title-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/img-redundant-alt-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/interactive-supports-focus-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/label-has-for-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/lang-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/media-has-caption-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/mouse-events-have-key-events-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-access-key-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-autofocus-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-distracting-elements-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-interactive-element-to-noninteractive-role-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-noninteractive-element-interactions-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-noninteractive-element-to-interactive-role-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-noninteractive-tabindex-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-onchange-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-redundant-roles-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-static-element-interactions-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/role-has-required-aria-props-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/role-supports-aria-props-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/scope-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/tabindex-no-positive-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/attributesComparator-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/getSuggestion-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/getTabIndex-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/hasAccessibleChild-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/isAbstractRole-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/isInteractiveElement-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/isInteractiveRole-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/isNonInteractiveElement-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/isNonInteractiveRole-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/parserOptionsMapper-test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/schemas-test' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/lib/index' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/lib/rules/accessible-emoji' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/lib/rules/alt-text' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/lib/rules/anchor-has-content' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/lib/rules/aria-activedescendant-has-tabindex' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/lib/rules/aria-props' { declare module.exports: any; } @@ -62,7 +282,7 @@ declare module 'eslint-plugin-jsx-a11y/lib/rules/html-has-lang' { declare module.exports: any; } -declare module 'eslint-plugin-jsx-a11y/lib/rules/img-has-alt' { +declare module 'eslint-plugin-jsx-a11y/lib/rules/iframe-has-title' { declare module.exports: any; } @@ -70,6 +290,10 @@ declare module 'eslint-plugin-jsx-a11y/lib/rules/img-redundant-alt' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/lib/rules/interactive-supports-focus' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/lib/rules/label-has-for' { declare module.exports: any; } @@ -78,6 +302,10 @@ declare module 'eslint-plugin-jsx-a11y/lib/rules/lang' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/lib/rules/media-has-caption' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/lib/rules/mouse-events-have-key-events' { declare module.exports: any; } @@ -86,7 +314,27 @@ declare module 'eslint-plugin-jsx-a11y/lib/rules/no-access-key' { declare module.exports: any; } -declare module 'eslint-plugin-jsx-a11y/lib/rules/no-marquee' { +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-autofocus' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-distracting-elements' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-interactive-element-to-noninteractive-role' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-noninteractive-element-interactions' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-noninteractive-element-to-interactive-role' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-noninteractive-tabindex' { declare module.exports: any; } @@ -94,18 +342,14 @@ declare module 'eslint-plugin-jsx-a11y/lib/rules/no-onchange' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-redundant-roles' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/lib/rules/no-static-element-interactions' { declare module.exports: any; } -declare module 'eslint-plugin-jsx-a11y/lib/rules/onclick-has-focus' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/lib/rules/onclick-has-role' { - declare module.exports: any; -} - declare module 'eslint-plugin-jsx-a11y/lib/rules/role-has-required-aria-props' { declare module.exports: any; } @@ -122,6 +366,10 @@ declare module 'eslint-plugin-jsx-a11y/lib/rules/tabindex-no-positive' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/lib/util/attributesComparator' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/lib/util/getImplicitRole' { declare module.exports: any; } @@ -134,6 +382,10 @@ declare module 'eslint-plugin-jsx-a11y/lib/util/getTabIndex' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/lib/util/hasAccessibleChild' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/lib/util/implicitRoles/a' { declare module.exports: any; } @@ -286,6 +538,10 @@ declare module 'eslint-plugin-jsx-a11y/lib/util/implicitRoles/ul' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/lib/util/isAbstractRole' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/lib/util/isHiddenFromScreenReader' { declare module.exports: any; } @@ -294,14 +550,66 @@ declare module 'eslint-plugin-jsx-a11y/lib/util/isInteractiveElement' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/lib/util/isInteractiveRole' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/lib/util/isNonInteractiveElement' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/lib/util/isNonInteractiveRole' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/lib/util/isPresentationRole' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/lib/util/schemas' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/scripts/addRuleToIndex' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/scripts/boilerplate/doc' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/scripts/boilerplate/rule' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/scripts/boilerplate/test' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/scripts/create-rule' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/src/index' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/src/rules/accessible-emoji' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/src/rules/alt-text' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/src/rules/anchor-has-content' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/src/rules/aria-activedescendant-has-tabindex' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/src/rules/aria-props' { declare module.exports: any; } @@ -334,7 +642,7 @@ declare module 'eslint-plugin-jsx-a11y/src/rules/html-has-lang' { declare module.exports: any; } -declare module 'eslint-plugin-jsx-a11y/src/rules/img-has-alt' { +declare module 'eslint-plugin-jsx-a11y/src/rules/iframe-has-title' { declare module.exports: any; } @@ -342,6 +650,10 @@ declare module 'eslint-plugin-jsx-a11y/src/rules/img-redundant-alt' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/src/rules/interactive-supports-focus' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/src/rules/label-has-for' { declare module.exports: any; } @@ -350,6 +662,10 @@ declare module 'eslint-plugin-jsx-a11y/src/rules/lang' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/src/rules/media-has-caption' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/src/rules/mouse-events-have-key-events' { declare module.exports: any; } @@ -358,7 +674,27 @@ declare module 'eslint-plugin-jsx-a11y/src/rules/no-access-key' { declare module.exports: any; } -declare module 'eslint-plugin-jsx-a11y/src/rules/no-marquee' { +declare module 'eslint-plugin-jsx-a11y/src/rules/no-autofocus' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/src/rules/no-distracting-elements' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/src/rules/no-interactive-element-to-noninteractive-role' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/src/rules/no-noninteractive-element-interactions' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/src/rules/no-noninteractive-element-to-interactive-role' { + declare module.exports: any; +} + +declare module 'eslint-plugin-jsx-a11y/src/rules/no-noninteractive-tabindex' { declare module.exports: any; } @@ -366,18 +702,14 @@ declare module 'eslint-plugin-jsx-a11y/src/rules/no-onchange' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/src/rules/no-redundant-roles' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/src/rules/no-static-element-interactions' { declare module.exports: any; } -declare module 'eslint-plugin-jsx-a11y/src/rules/onclick-has-focus' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/src/rules/onclick-has-role' { - declare module.exports: any; -} - declare module 'eslint-plugin-jsx-a11y/src/rules/role-has-required-aria-props' { declare module.exports: any; } @@ -394,6 +726,10 @@ declare module 'eslint-plugin-jsx-a11y/src/rules/tabindex-no-positive' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/src/util/attributesComparator' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/src/util/getImplicitRole' { declare module.exports: any; } @@ -406,6 +742,10 @@ declare module 'eslint-plugin-jsx-a11y/src/util/getTabIndex' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/src/util/hasAccessibleChild' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/src/util/implicitRoles/a' { declare module.exports: any; } @@ -558,6 +898,10 @@ declare module 'eslint-plugin-jsx-a11y/src/util/implicitRoles/ul' { declare module.exports: any; } +declare module 'eslint-plugin-jsx-a11y/src/util/isAbstractRole' { + declare module.exports: any; +} + declare module 'eslint-plugin-jsx-a11y/src/util/isHiddenFromScreenReader' { declare module.exports: any; } @@ -566,117 +910,198 @@ declare module 'eslint-plugin-jsx-a11y/src/util/isInteractiveElement' { declare module.exports: any; } -declare module 'eslint-plugin-jsx-a11y/tests/index' { +declare module 'eslint-plugin-jsx-a11y/src/util/isInteractiveRole' { declare module.exports: any; } -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/anchor-has-content' { +declare module 'eslint-plugin-jsx-a11y/src/util/isNonInteractiveElement' { declare module.exports: any; } -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/aria-props' { +declare module 'eslint-plugin-jsx-a11y/src/util/isNonInteractiveRole' { declare module.exports: any; } -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/aria-proptypes' { +declare module 'eslint-plugin-jsx-a11y/src/util/isPresentationRole' { declare module.exports: any; } -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/aria-role' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/aria-unsupported-elements' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/click-events-have-key-events' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/heading-has-content' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/href-no-hash' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/html-has-lang' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/img-has-alt' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/img-redundant-alt' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/label-has-for' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/lang' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/mouse-events-have-key-events' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/no-access-key' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/no-marquee' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/no-onchange' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/no-static-element-interactions' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/onclick-has-focus' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/onclick-has-role' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/role-has-required-aria-props' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/role-supports-aria-props' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/scope' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/tabindex-no-positive' { - declare module.exports: any; -} - -declare module 'eslint-plugin-jsx-a11y/tests/src/util/getSuggestion' { +declare module 'eslint-plugin-jsx-a11y/src/util/schemas' { declare module.exports: any; } // Filename aliases +declare module 'eslint-plugin-jsx-a11y/__mocks__/genInteractives.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__mocks__/genInteractives'>; +} +declare module 'eslint-plugin-jsx-a11y/__mocks__/IdentifierMock.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__mocks__/IdentifierMock'>; +} +declare module 'eslint-plugin-jsx-a11y/__mocks__/JSXAttributeMock.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__mocks__/JSXAttributeMock'>; +} +declare module 'eslint-plugin-jsx-a11y/__mocks__/JSXElementMock.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__mocks__/JSXElementMock'>; +} +declare module 'eslint-plugin-jsx-a11y/__mocks__/JSXExpressionContainerMock.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__mocks__/JSXExpressionContainerMock'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/__util__/parserOptionsMapper.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/__util__/parserOptionsMapper'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/__util__/ruleOptionsMapperFactory.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/__util__/ruleOptionsMapperFactory'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/index-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/index-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/accessible-emoji-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/accessible-emoji-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/alt-text-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/alt-text-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/anchor-has-content-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/anchor-has-content-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-activedescendant-has-tabindex-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-activedescendant-has-tabindex-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-props-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-props-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-proptypes-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-proptypes-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-role-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-role-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-unsupported-elements-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/aria-unsupported-elements-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/click-events-have-key-events-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/click-events-have-key-events-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/heading-has-content-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/heading-has-content-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/href-no-hash-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/href-no-hash-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/html-has-lang-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/html-has-lang-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/iframe-has-title-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/iframe-has-title-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/img-redundant-alt-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/img-redundant-alt-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/interactive-supports-focus-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/interactive-supports-focus-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/label-has-for-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/label-has-for-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/lang-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/lang-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/media-has-caption-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/media-has-caption-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/mouse-events-have-key-events-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/mouse-events-have-key-events-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-access-key-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/no-access-key-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-autofocus-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/no-autofocus-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-distracting-elements-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/no-distracting-elements-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-interactive-element-to-noninteractive-role-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/no-interactive-element-to-noninteractive-role-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-noninteractive-element-interactions-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/no-noninteractive-element-interactions-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-noninteractive-element-to-interactive-role-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/no-noninteractive-element-to-interactive-role-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-noninteractive-tabindex-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/no-noninteractive-tabindex-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-onchange-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/no-onchange-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-redundant-roles-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/no-redundant-roles-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/no-static-element-interactions-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/no-static-element-interactions-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/role-has-required-aria-props-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/role-has-required-aria-props-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/role-supports-aria-props-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/role-supports-aria-props-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/scope-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/scope-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/rules/tabindex-no-positive-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/rules/tabindex-no-positive-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/attributesComparator-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/util/attributesComparator-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/getSuggestion-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/util/getSuggestion-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/getTabIndex-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/util/getTabIndex-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/hasAccessibleChild-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/util/hasAccessibleChild-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/isAbstractRole-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/util/isAbstractRole-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/isInteractiveElement-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/util/isInteractiveElement-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/isInteractiveRole-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/util/isInteractiveRole-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/isNonInteractiveElement-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/util/isNonInteractiveElement-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/isNonInteractiveRole-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/util/isNonInteractiveRole-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/parserOptionsMapper-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/util/parserOptionsMapper-test'>; +} +declare module 'eslint-plugin-jsx-a11y/__tests__/src/util/schemas-test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/__tests__/src/util/schemas-test'>; +} declare module 'eslint-plugin-jsx-a11y/lib/index.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/index'>; } +declare module 'eslint-plugin-jsx-a11y/lib/rules/accessible-emoji.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/accessible-emoji'>; +} +declare module 'eslint-plugin-jsx-a11y/lib/rules/alt-text.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/alt-text'>; +} declare module 'eslint-plugin-jsx-a11y/lib/rules/anchor-has-content.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/anchor-has-content'>; } +declare module 'eslint-plugin-jsx-a11y/lib/rules/aria-activedescendant-has-tabindex.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/aria-activedescendant-has-tabindex'>; +} declare module 'eslint-plugin-jsx-a11y/lib/rules/aria-props.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/aria-props'>; } @@ -701,39 +1126,57 @@ declare module 'eslint-plugin-jsx-a11y/lib/rules/href-no-hash.js' { declare module 'eslint-plugin-jsx-a11y/lib/rules/html-has-lang.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/html-has-lang'>; } -declare module 'eslint-plugin-jsx-a11y/lib/rules/img-has-alt.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/img-has-alt'>; +declare module 'eslint-plugin-jsx-a11y/lib/rules/iframe-has-title.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/iframe-has-title'>; } declare module 'eslint-plugin-jsx-a11y/lib/rules/img-redundant-alt.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/img-redundant-alt'>; } +declare module 'eslint-plugin-jsx-a11y/lib/rules/interactive-supports-focus.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/interactive-supports-focus'>; +} declare module 'eslint-plugin-jsx-a11y/lib/rules/label-has-for.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/label-has-for'>; } declare module 'eslint-plugin-jsx-a11y/lib/rules/lang.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/lang'>; } +declare module 'eslint-plugin-jsx-a11y/lib/rules/media-has-caption.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/media-has-caption'>; +} declare module 'eslint-plugin-jsx-a11y/lib/rules/mouse-events-have-key-events.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/mouse-events-have-key-events'>; } declare module 'eslint-plugin-jsx-a11y/lib/rules/no-access-key.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/no-access-key'>; } -declare module 'eslint-plugin-jsx-a11y/lib/rules/no-marquee.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/no-marquee'>; +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-autofocus.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/no-autofocus'>; +} +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-distracting-elements.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/no-distracting-elements'>; +} +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-interactive-element-to-noninteractive-role.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/no-interactive-element-to-noninteractive-role'>; +} +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-noninteractive-element-interactions.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/no-noninteractive-element-interactions'>; +} +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-noninteractive-element-to-interactive-role.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/no-noninteractive-element-to-interactive-role'>; +} +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-noninteractive-tabindex.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/no-noninteractive-tabindex'>; } declare module 'eslint-plugin-jsx-a11y/lib/rules/no-onchange.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/no-onchange'>; } +declare module 'eslint-plugin-jsx-a11y/lib/rules/no-redundant-roles.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/no-redundant-roles'>; +} declare module 'eslint-plugin-jsx-a11y/lib/rules/no-static-element-interactions.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/no-static-element-interactions'>; } -declare module 'eslint-plugin-jsx-a11y/lib/rules/onclick-has-focus.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/onclick-has-focus'>; -} -declare module 'eslint-plugin-jsx-a11y/lib/rules/onclick-has-role.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/onclick-has-role'>; -} declare module 'eslint-plugin-jsx-a11y/lib/rules/role-has-required-aria-props.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/role-has-required-aria-props'>; } @@ -746,6 +1189,9 @@ declare module 'eslint-plugin-jsx-a11y/lib/rules/scope.js' { declare module 'eslint-plugin-jsx-a11y/lib/rules/tabindex-no-positive.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/rules/tabindex-no-positive'>; } +declare module 'eslint-plugin-jsx-a11y/lib/util/attributesComparator.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/attributesComparator'>; +} declare module 'eslint-plugin-jsx-a11y/lib/util/getImplicitRole.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/getImplicitRole'>; } @@ -755,6 +1201,9 @@ declare module 'eslint-plugin-jsx-a11y/lib/util/getSuggestion.js' { declare module 'eslint-plugin-jsx-a11y/lib/util/getTabIndex.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/getTabIndex'>; } +declare module 'eslint-plugin-jsx-a11y/lib/util/hasAccessibleChild.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/hasAccessibleChild'>; +} declare module 'eslint-plugin-jsx-a11y/lib/util/implicitRoles/a.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/implicitRoles/a'>; } @@ -869,18 +1318,60 @@ declare module 'eslint-plugin-jsx-a11y/lib/util/implicitRoles/thead.js' { declare module 'eslint-plugin-jsx-a11y/lib/util/implicitRoles/ul.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/implicitRoles/ul'>; } +declare module 'eslint-plugin-jsx-a11y/lib/util/isAbstractRole.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/isAbstractRole'>; +} declare module 'eslint-plugin-jsx-a11y/lib/util/isHiddenFromScreenReader.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/isHiddenFromScreenReader'>; } declare module 'eslint-plugin-jsx-a11y/lib/util/isInteractiveElement.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/isInteractiveElement'>; } +declare module 'eslint-plugin-jsx-a11y/lib/util/isInteractiveRole.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/isInteractiveRole'>; +} +declare module 'eslint-plugin-jsx-a11y/lib/util/isNonInteractiveElement.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/isNonInteractiveElement'>; +} +declare module 'eslint-plugin-jsx-a11y/lib/util/isNonInteractiveRole.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/isNonInteractiveRole'>; +} +declare module 'eslint-plugin-jsx-a11y/lib/util/isPresentationRole.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/isPresentationRole'>; +} +declare module 'eslint-plugin-jsx-a11y/lib/util/schemas.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/lib/util/schemas'>; +} +declare module 'eslint-plugin-jsx-a11y/scripts/addRuleToIndex.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/scripts/addRuleToIndex'>; +} +declare module 'eslint-plugin-jsx-a11y/scripts/boilerplate/doc.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/scripts/boilerplate/doc'>; +} +declare module 'eslint-plugin-jsx-a11y/scripts/boilerplate/rule.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/scripts/boilerplate/rule'>; +} +declare module 'eslint-plugin-jsx-a11y/scripts/boilerplate/test.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/scripts/boilerplate/test'>; +} +declare module 'eslint-plugin-jsx-a11y/scripts/create-rule.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/scripts/create-rule'>; +} declare module 'eslint-plugin-jsx-a11y/src/index.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/index'>; } +declare module 'eslint-plugin-jsx-a11y/src/rules/accessible-emoji.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/accessible-emoji'>; +} +declare module 'eslint-plugin-jsx-a11y/src/rules/alt-text.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/alt-text'>; +} declare module 'eslint-plugin-jsx-a11y/src/rules/anchor-has-content.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/anchor-has-content'>; } +declare module 'eslint-plugin-jsx-a11y/src/rules/aria-activedescendant-has-tabindex.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/aria-activedescendant-has-tabindex'>; +} declare module 'eslint-plugin-jsx-a11y/src/rules/aria-props.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/aria-props'>; } @@ -905,39 +1396,57 @@ declare module 'eslint-plugin-jsx-a11y/src/rules/href-no-hash.js' { declare module 'eslint-plugin-jsx-a11y/src/rules/html-has-lang.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/html-has-lang'>; } -declare module 'eslint-plugin-jsx-a11y/src/rules/img-has-alt.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/img-has-alt'>; +declare module 'eslint-plugin-jsx-a11y/src/rules/iframe-has-title.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/iframe-has-title'>; } declare module 'eslint-plugin-jsx-a11y/src/rules/img-redundant-alt.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/img-redundant-alt'>; } +declare module 'eslint-plugin-jsx-a11y/src/rules/interactive-supports-focus.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/interactive-supports-focus'>; +} declare module 'eslint-plugin-jsx-a11y/src/rules/label-has-for.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/label-has-for'>; } declare module 'eslint-plugin-jsx-a11y/src/rules/lang.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/lang'>; } +declare module 'eslint-plugin-jsx-a11y/src/rules/media-has-caption.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/media-has-caption'>; +} declare module 'eslint-plugin-jsx-a11y/src/rules/mouse-events-have-key-events.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/mouse-events-have-key-events'>; } declare module 'eslint-plugin-jsx-a11y/src/rules/no-access-key.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/no-access-key'>; } -declare module 'eslint-plugin-jsx-a11y/src/rules/no-marquee.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/no-marquee'>; +declare module 'eslint-plugin-jsx-a11y/src/rules/no-autofocus.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/no-autofocus'>; +} +declare module 'eslint-plugin-jsx-a11y/src/rules/no-distracting-elements.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/no-distracting-elements'>; +} +declare module 'eslint-plugin-jsx-a11y/src/rules/no-interactive-element-to-noninteractive-role.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/no-interactive-element-to-noninteractive-role'>; +} +declare module 'eslint-plugin-jsx-a11y/src/rules/no-noninteractive-element-interactions.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/no-noninteractive-element-interactions'>; +} +declare module 'eslint-plugin-jsx-a11y/src/rules/no-noninteractive-element-to-interactive-role.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/no-noninteractive-element-to-interactive-role'>; +} +declare module 'eslint-plugin-jsx-a11y/src/rules/no-noninteractive-tabindex.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/no-noninteractive-tabindex'>; } declare module 'eslint-plugin-jsx-a11y/src/rules/no-onchange.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/no-onchange'>; } +declare module 'eslint-plugin-jsx-a11y/src/rules/no-redundant-roles.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/no-redundant-roles'>; +} declare module 'eslint-plugin-jsx-a11y/src/rules/no-static-element-interactions.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/no-static-element-interactions'>; } -declare module 'eslint-plugin-jsx-a11y/src/rules/onclick-has-focus.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/onclick-has-focus'>; -} -declare module 'eslint-plugin-jsx-a11y/src/rules/onclick-has-role.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/onclick-has-role'>; -} declare module 'eslint-plugin-jsx-a11y/src/rules/role-has-required-aria-props.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/role-has-required-aria-props'>; } @@ -950,6 +1459,9 @@ declare module 'eslint-plugin-jsx-a11y/src/rules/scope.js' { declare module 'eslint-plugin-jsx-a11y/src/rules/tabindex-no-positive.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/rules/tabindex-no-positive'>; } +declare module 'eslint-plugin-jsx-a11y/src/util/attributesComparator.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/attributesComparator'>; +} declare module 'eslint-plugin-jsx-a11y/src/util/getImplicitRole.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/getImplicitRole'>; } @@ -959,6 +1471,9 @@ declare module 'eslint-plugin-jsx-a11y/src/util/getSuggestion.js' { declare module 'eslint-plugin-jsx-a11y/src/util/getTabIndex.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/getTabIndex'>; } +declare module 'eslint-plugin-jsx-a11y/src/util/hasAccessibleChild.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/hasAccessibleChild'>; +} declare module 'eslint-plugin-jsx-a11y/src/util/implicitRoles/a.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/implicitRoles/a'>; } @@ -1073,87 +1588,27 @@ declare module 'eslint-plugin-jsx-a11y/src/util/implicitRoles/thead.js' { declare module 'eslint-plugin-jsx-a11y/src/util/implicitRoles/ul.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/implicitRoles/ul'>; } +declare module 'eslint-plugin-jsx-a11y/src/util/isAbstractRole.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/isAbstractRole'>; +} declare module 'eslint-plugin-jsx-a11y/src/util/isHiddenFromScreenReader.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/isHiddenFromScreenReader'>; } declare module 'eslint-plugin-jsx-a11y/src/util/isInteractiveElement.js' { declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/isInteractiveElement'>; } -declare module 'eslint-plugin-jsx-a11y/tests/index.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/index'>; +declare module 'eslint-plugin-jsx-a11y/src/util/isInteractiveRole.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/isInteractiveRole'>; } -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/anchor-has-content.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/anchor-has-content'>; +declare module 'eslint-plugin-jsx-a11y/src/util/isNonInteractiveElement.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/isNonInteractiveElement'>; } -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/aria-props.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/aria-props'>; +declare module 'eslint-plugin-jsx-a11y/src/util/isNonInteractiveRole.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/isNonInteractiveRole'>; } -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/aria-proptypes.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/aria-proptypes'>; +declare module 'eslint-plugin-jsx-a11y/src/util/isPresentationRole.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/isPresentationRole'>; } -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/aria-role.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/aria-role'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/aria-unsupported-elements.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/aria-unsupported-elements'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/click-events-have-key-events.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/click-events-have-key-events'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/heading-has-content.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/heading-has-content'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/href-no-hash.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/href-no-hash'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/html-has-lang.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/html-has-lang'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/img-has-alt.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/img-has-alt'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/img-redundant-alt.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/img-redundant-alt'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/label-has-for.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/label-has-for'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/lang.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/lang'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/mouse-events-have-key-events.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/mouse-events-have-key-events'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/no-access-key.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/no-access-key'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/no-marquee.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/no-marquee'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/no-onchange.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/no-onchange'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/no-static-element-interactions.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/no-static-element-interactions'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/onclick-has-focus.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/onclick-has-focus'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/onclick-has-role.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/onclick-has-role'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/role-has-required-aria-props.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/role-has-required-aria-props'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/role-supports-aria-props.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/role-supports-aria-props'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/scope.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/scope'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/rules/tabindex-no-positive.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/rules/tabindex-no-positive'>; -} -declare module 'eslint-plugin-jsx-a11y/tests/src/util/getSuggestion.js' { - declare module.exports: $Exports<'eslint-plugin-jsx-a11y/tests/src/util/getSuggestion'>; +declare module 'eslint-plugin-jsx-a11y/src/util/schemas.js' { + declare module.exports: $Exports<'eslint-plugin-jsx-a11y/src/util/schemas'>; } diff --git a/flow-typed/npm/eslint-plugin-prettier_vx.x.x.js b/flow-typed/npm/eslint-plugin-prettier_vx.x.x.js new file mode 100644 index 0000000..3ff5683 --- /dev/null +++ b/flow-typed/npm/eslint-plugin-prettier_vx.x.x.js @@ -0,0 +1,46 @@ +// flow-typed signature: 7705993c316ac97ed14e3e50dcf0b057 +// flow-typed version: <>/eslint-plugin-prettier_v^2.0.1/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'eslint-plugin-prettier' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'eslint-plugin-prettier' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ +declare module 'eslint-plugin-prettier/lib/index' { + declare module.exports: any; +} + +declare module 'eslint-plugin-prettier/lib/rules/prettier' { + declare module.exports: any; +} + +declare module 'eslint-plugin-prettier/tests/lib/rules/prettier' { + declare module.exports: any; +} + +// Filename aliases +declare module 'eslint-plugin-prettier/lib/index.js' { + declare module.exports: $Exports<'eslint-plugin-prettier/lib/index'>; +} +declare module 'eslint-plugin-prettier/lib/rules/prettier.js' { + declare module.exports: $Exports<'eslint-plugin-prettier/lib/rules/prettier'>; +} +declare module 'eslint-plugin-prettier/tests/lib/rules/prettier.js' { + declare module.exports: $Exports<'eslint-plugin-prettier/tests/lib/rules/prettier'>; +} diff --git a/flow-typed/npm/eslint-plugin-react_vx.x.x.js b/flow-typed/npm/eslint-plugin-react_vx.x.x.js index 16fe704..8be885f 100644 --- a/flow-typed/npm/eslint-plugin-react_vx.x.x.js +++ b/flow-typed/npm/eslint-plugin-react_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 3feb59aa7c12a2f4969babcbd49f5e47 -// flow-typed version: <>/eslint-plugin-react_v^6.3.0/flow_v0.37.0 +// flow-typed signature: 9cc99825da1604cebf5b62c3c3282021 +// flow-typed version: <>/eslint-plugin-react_v^7.0.1/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ @@ -30,6 +30,14 @@ declare module 'eslint-plugin-react/lib/rules/forbid-component-props' { declare module.exports: any; } +declare module 'eslint-plugin-react/lib/rules/forbid-elements' { + declare module.exports: any; +} + +declare module 'eslint-plugin-react/lib/rules/forbid-foreign-prop-types' { + declare module.exports: any; +} + declare module 'eslint-plugin-react/lib/rules/forbid-prop-types' { declare module.exports: any; } @@ -138,10 +146,6 @@ declare module 'eslint-plugin-react/lib/rules/no-children-prop' { declare module.exports: any; } -declare module 'eslint-plugin-react/lib/rules/no-comment-textnodes' { - declare module.exports: any; -} - declare module 'eslint-plugin-react/lib/rules/no-danger-with-children' { declare module.exports: any; } @@ -202,6 +206,10 @@ declare module 'eslint-plugin-react/lib/rules/no-unused-prop-types' { declare module.exports: any; } +declare module 'eslint-plugin-react/lib/rules/no-will-update-set-state' { + declare module.exports: any; +} + declare module 'eslint-plugin-react/lib/rules/prefer-es6-class' { declare module.exports: any; } @@ -222,10 +230,6 @@ declare module 'eslint-plugin-react/lib/rules/require-default-props' { declare module.exports: any; } -declare module 'eslint-plugin-react/lib/rules/require-extension' { - declare module.exports: any; -} - declare module 'eslint-plugin-react/lib/rules/require-optimization' { declare module.exports: any; } @@ -250,7 +254,7 @@ declare module 'eslint-plugin-react/lib/rules/style-prop-object' { declare module.exports: any; } -declare module 'eslint-plugin-react/lib/rules/wrap-multilines' { +declare module 'eslint-plugin-react/lib/rules/void-dom-elements-no-children' { declare module.exports: any; } @@ -266,6 +270,10 @@ declare module 'eslint-plugin-react/lib/util/getTokenBeforeClosingBracket' { declare module.exports: any; } +declare module 'eslint-plugin-react/lib/util/makeNoMethodSetStateRule' { + declare module.exports: any; +} + declare module 'eslint-plugin-react/lib/util/pragma' { declare module.exports: any; } @@ -291,6 +299,12 @@ declare module 'eslint-plugin-react/lib/rules/display-name.js' { declare module 'eslint-plugin-react/lib/rules/forbid-component-props.js' { declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-component-props'>; } +declare module 'eslint-plugin-react/lib/rules/forbid-elements.js' { + declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-elements'>; +} +declare module 'eslint-plugin-react/lib/rules/forbid-foreign-prop-types.js' { + declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-foreign-prop-types'>; +} declare module 'eslint-plugin-react/lib/rules/forbid-prop-types.js' { declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-prop-types'>; } @@ -372,9 +386,6 @@ declare module 'eslint-plugin-react/lib/rules/no-array-index-key.js' { declare module 'eslint-plugin-react/lib/rules/no-children-prop.js' { declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-children-prop'>; } -declare module 'eslint-plugin-react/lib/rules/no-comment-textnodes.js' { - declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-comment-textnodes'>; -} declare module 'eslint-plugin-react/lib/rules/no-danger-with-children.js' { declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-danger-with-children'>; } @@ -420,6 +431,9 @@ declare module 'eslint-plugin-react/lib/rules/no-unknown-property.js' { declare module 'eslint-plugin-react/lib/rules/no-unused-prop-types.js' { declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-unused-prop-types'>; } +declare module 'eslint-plugin-react/lib/rules/no-will-update-set-state.js' { + declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-will-update-set-state'>; +} declare module 'eslint-plugin-react/lib/rules/prefer-es6-class.js' { declare module.exports: $Exports<'eslint-plugin-react/lib/rules/prefer-es6-class'>; } @@ -435,9 +449,6 @@ declare module 'eslint-plugin-react/lib/rules/react-in-jsx-scope.js' { declare module 'eslint-plugin-react/lib/rules/require-default-props.js' { declare module.exports: $Exports<'eslint-plugin-react/lib/rules/require-default-props'>; } -declare module 'eslint-plugin-react/lib/rules/require-extension.js' { - declare module.exports: $Exports<'eslint-plugin-react/lib/rules/require-extension'>; -} declare module 'eslint-plugin-react/lib/rules/require-optimization.js' { declare module.exports: $Exports<'eslint-plugin-react/lib/rules/require-optimization'>; } @@ -456,8 +467,8 @@ declare module 'eslint-plugin-react/lib/rules/sort-prop-types.js' { declare module 'eslint-plugin-react/lib/rules/style-prop-object.js' { declare module.exports: $Exports<'eslint-plugin-react/lib/rules/style-prop-object'>; } -declare module 'eslint-plugin-react/lib/rules/wrap-multilines.js' { - declare module.exports: $Exports<'eslint-plugin-react/lib/rules/wrap-multilines'>; +declare module 'eslint-plugin-react/lib/rules/void-dom-elements-no-children.js' { + declare module.exports: $Exports<'eslint-plugin-react/lib/rules/void-dom-elements-no-children'>; } declare module 'eslint-plugin-react/lib/util/annotations.js' { declare module.exports: $Exports<'eslint-plugin-react/lib/util/annotations'>; @@ -468,6 +479,9 @@ declare module 'eslint-plugin-react/lib/util/Components.js' { declare module 'eslint-plugin-react/lib/util/getTokenBeforeClosingBracket.js' { declare module.exports: $Exports<'eslint-plugin-react/lib/util/getTokenBeforeClosingBracket'>; } +declare module 'eslint-plugin-react/lib/util/makeNoMethodSetStateRule.js' { + declare module.exports: $Exports<'eslint-plugin-react/lib/util/makeNoMethodSetStateRule'>; +} declare module 'eslint-plugin-react/lib/util/pragma.js' { declare module.exports: $Exports<'eslint-plugin-react/lib/util/pragma'>; } diff --git a/flow-typed/npm/eslint_vx.x.x.js b/flow-typed/npm/eslint_vx.x.x.js index 4a2ccec..9e1f229 100644 --- a/flow-typed/npm/eslint_vx.x.x.js +++ b/flow-typed/npm/eslint_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 101e1d32df6b776dc2ded281251bd36e -// flow-typed version: <>/eslint_v^3.9.1/flow_v0.37.0 +// flow-typed signature: dd3494d8356296df35d657fd358968c5 +// flow-typed version: <>/eslint_v^3.19.0/flow_v0.49.1 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ @@ -38,6 +38,10 @@ declare module 'eslint/conf/eslint-all' { declare module.exports: any; } +declare module 'eslint/conf/eslint-recommended' { + declare module.exports: any; +} + declare module 'eslint/lib/api' { declare module.exports: any; } @@ -478,6 +482,10 @@ declare module 'eslint/lib/rules/no-class-assign' { declare module.exports: any; } +declare module 'eslint/lib/rules/no-compare-neg-zero' { + declare module.exports: any; +} + declare module 'eslint/lib/rules/no-cond-assign' { declare module.exports: any; } @@ -682,6 +690,10 @@ declare module 'eslint/lib/rules/no-mixed-spaces-and-tabs' { declare module.exports: any; } +declare module 'eslint/lib/rules/no-multi-assign' { + declare module.exports: any; +} + declare module 'eslint/lib/rules/no-multi-spaces' { declare module.exports: any; } @@ -974,6 +986,10 @@ declare module 'eslint/lib/rules/no-with' { declare module.exports: any; } +declare module 'eslint/lib/rules/nonblock-statement-body-position' { + declare module.exports: any; +} + declare module 'eslint/lib/rules/object-curly-newline' { declare module.exports: any; } @@ -1018,10 +1034,18 @@ declare module 'eslint/lib/rules/prefer-const' { declare module.exports: any; } +declare module 'eslint/lib/rules/prefer-destructuring' { + declare module.exports: any; +} + declare module 'eslint/lib/rules/prefer-numeric-literals' { declare module.exports: any; } +declare module 'eslint/lib/rules/prefer-promise-reject-errors' { + declare module.exports: any; +} + declare module 'eslint/lib/rules/prefer-reflect' { declare module.exports: any; } @@ -1122,6 +1146,10 @@ declare module 'eslint/lib/rules/template-curly-spacing' { declare module.exports: any; } +declare module 'eslint/lib/rules/template-tag-spacing' { + declare module.exports: any; +} + declare module 'eslint/lib/rules/unicode-bom' { declare module.exports: any; } @@ -1170,7 +1198,55 @@ declare module 'eslint/lib/timing' { declare module.exports: any; } -declare module 'eslint/lib/token-store' { +declare module 'eslint/lib/token-store/backward-token-comment-cursor' { + declare module.exports: any; +} + +declare module 'eslint/lib/token-store/backward-token-cursor' { + declare module.exports: any; +} + +declare module 'eslint/lib/token-store/cursor' { + declare module.exports: any; +} + +declare module 'eslint/lib/token-store/cursors' { + declare module.exports: any; +} + +declare module 'eslint/lib/token-store/decorative-cursor' { + declare module.exports: any; +} + +declare module 'eslint/lib/token-store/filter-cursor' { + declare module.exports: any; +} + +declare module 'eslint/lib/token-store/forward-token-comment-cursor' { + declare module.exports: any; +} + +declare module 'eslint/lib/token-store/forward-token-cursor' { + declare module.exports: any; +} + +declare module 'eslint/lib/token-store/index' { + declare module.exports: any; +} + +declare module 'eslint/lib/token-store/limit-cursor' { + declare module.exports: any; +} + +declare module 'eslint/lib/token-store/padded-token-cursor' { + declare module.exports: any; +} + +declare module 'eslint/lib/token-store/skip-cursor' { + declare module.exports: any; +} + +declare module 'eslint/lib/token-store/utils' { declare module.exports: any; } @@ -1178,6 +1254,10 @@ declare module 'eslint/lib/util/comment-event-generator' { declare module.exports: any; } +declare module 'eslint/lib/util/fix-tracker' { + declare module.exports: any; +} + declare module 'eslint/lib/util/glob-util' { declare module.exports: any; } @@ -1251,6 +1331,9 @@ declare module 'eslint/conf/environments.js' { declare module 'eslint/conf/eslint-all.js' { declare module.exports: $Exports<'eslint/conf/eslint-all'>; } +declare module 'eslint/conf/eslint-recommended.js' { + declare module.exports: $Exports<'eslint/conf/eslint-recommended'>; +} declare module 'eslint/lib/api.js' { declare module.exports: $Exports<'eslint/lib/api'>; } @@ -1581,6 +1664,9 @@ declare module 'eslint/lib/rules/no-catch-shadow.js' { declare module 'eslint/lib/rules/no-class-assign.js' { declare module.exports: $Exports<'eslint/lib/rules/no-class-assign'>; } +declare module 'eslint/lib/rules/no-compare-neg-zero.js' { + declare module.exports: $Exports<'eslint/lib/rules/no-compare-neg-zero'>; +} declare module 'eslint/lib/rules/no-cond-assign.js' { declare module.exports: $Exports<'eslint/lib/rules/no-cond-assign'>; } @@ -1734,6 +1820,9 @@ declare module 'eslint/lib/rules/no-mixed-requires.js' { declare module 'eslint/lib/rules/no-mixed-spaces-and-tabs.js' { declare module.exports: $Exports<'eslint/lib/rules/no-mixed-spaces-and-tabs'>; } +declare module 'eslint/lib/rules/no-multi-assign.js' { + declare module.exports: $Exports<'eslint/lib/rules/no-multi-assign'>; +} declare module 'eslint/lib/rules/no-multi-spaces.js' { declare module.exports: $Exports<'eslint/lib/rules/no-multi-spaces'>; } @@ -1953,6 +2042,9 @@ declare module 'eslint/lib/rules/no-whitespace-before-property.js' { declare module 'eslint/lib/rules/no-with.js' { declare module.exports: $Exports<'eslint/lib/rules/no-with'>; } +declare module 'eslint/lib/rules/nonblock-statement-body-position.js' { + declare module.exports: $Exports<'eslint/lib/rules/nonblock-statement-body-position'>; +} declare module 'eslint/lib/rules/object-curly-newline.js' { declare module.exports: $Exports<'eslint/lib/rules/object-curly-newline'>; } @@ -1986,9 +2078,15 @@ declare module 'eslint/lib/rules/prefer-arrow-callback.js' { declare module 'eslint/lib/rules/prefer-const.js' { declare module.exports: $Exports<'eslint/lib/rules/prefer-const'>; } +declare module 'eslint/lib/rules/prefer-destructuring.js' { + declare module.exports: $Exports<'eslint/lib/rules/prefer-destructuring'>; +} declare module 'eslint/lib/rules/prefer-numeric-literals.js' { declare module.exports: $Exports<'eslint/lib/rules/prefer-numeric-literals'>; } +declare module 'eslint/lib/rules/prefer-promise-reject-errors.js' { + declare module.exports: $Exports<'eslint/lib/rules/prefer-promise-reject-errors'>; +} declare module 'eslint/lib/rules/prefer-reflect.js' { declare module.exports: $Exports<'eslint/lib/rules/prefer-reflect'>; } @@ -2064,6 +2162,9 @@ declare module 'eslint/lib/rules/symbol-description.js' { declare module 'eslint/lib/rules/template-curly-spacing.js' { declare module.exports: $Exports<'eslint/lib/rules/template-curly-spacing'>; } +declare module 'eslint/lib/rules/template-tag-spacing.js' { + declare module.exports: $Exports<'eslint/lib/rules/template-tag-spacing'>; +} declare module 'eslint/lib/rules/unicode-bom.js' { declare module.exports: $Exports<'eslint/lib/rules/unicode-bom'>; } @@ -2100,12 +2201,51 @@ declare module 'eslint/lib/testers/rule-tester.js' { declare module 'eslint/lib/timing.js' { declare module.exports: $Exports<'eslint/lib/timing'>; } -declare module 'eslint/lib/token-store.js' { - declare module.exports: $Exports<'eslint/lib/token-store'>; +declare module 'eslint/lib/token-store/backward-token-comment-cursor.js' { + declare module.exports: $Exports<'eslint/lib/token-store/backward-token-comment-cursor'>; +} +declare module 'eslint/lib/token-store/backward-token-cursor.js' { + declare module.exports: $Exports<'eslint/lib/token-store/backward-token-cursor'>; +} +declare module 'eslint/lib/token-store/cursor.js' { + declare module.exports: $Exports<'eslint/lib/token-store/cursor'>; +} +declare module 'eslint/lib/token-store/cursors.js' { + declare module.exports: $Exports<'eslint/lib/token-store/cursors'>; +} +declare module 'eslint/lib/token-store/decorative-cursor.js' { + declare module.exports: $Exports<'eslint/lib/token-store/decorative-cursor'>; +} +declare module 'eslint/lib/token-store/filter-cursor.js' { + declare module.exports: $Exports<'eslint/lib/token-store/filter-cursor'>; +} +declare module 'eslint/lib/token-store/forward-token-comment-cursor.js' { + declare module.exports: $Exports<'eslint/lib/token-store/forward-token-comment-cursor'>; +} +declare module 'eslint/lib/token-store/forward-token-cursor.js' { + declare module.exports: $Exports<'eslint/lib/token-store/forward-token-cursor'>; +} +declare module 'eslint/lib/token-store/index.js' { + declare module.exports: $Exports<'eslint/lib/token-store/index'>; +} +declare module 'eslint/lib/token-store/limit-cursor.js' { + declare module.exports: $Exports<'eslint/lib/token-store/limit-cursor'>; +} +declare module 'eslint/lib/token-store/padded-token-cursor.js' { + declare module.exports: $Exports<'eslint/lib/token-store/padded-token-cursor'>; +} +declare module 'eslint/lib/token-store/skip-cursor.js' { + declare module.exports: $Exports<'eslint/lib/token-store/skip-cursor'>; +} +declare module 'eslint/lib/token-store/utils.js' { + declare module.exports: $Exports<'eslint/lib/token-store/utils'>; } declare module 'eslint/lib/util/comment-event-generator.js' { declare module.exports: $Exports<'eslint/lib/util/comment-event-generator'>; } +declare module 'eslint/lib/util/fix-tracker.js' { + declare module.exports: $Exports<'eslint/lib/util/fix-tracker'>; +} declare module 'eslint/lib/util/glob-util.js' { declare module.exports: $Exports<'eslint/lib/util/glob-util'>; } diff --git a/flow-typed/npm/hoist-non-react-statics_vx.x.x.js b/flow-typed/npm/hoist-non-react-statics_vx.x.x.js new file mode 100644 index 0000000..e860e70 --- /dev/null +++ b/flow-typed/npm/hoist-non-react-statics_vx.x.x.js @@ -0,0 +1,33 @@ +// flow-typed signature: b6d0f1f7d2b72d32bb73490f48fef0f0 +// flow-typed version: <>/hoist-non-react-statics_v^1.2.0/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'hoist-non-react-statics' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'hoist-non-react-statics' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ + + +// Filename aliases +declare module 'hoist-non-react-statics/index' { + declare module.exports: $Exports<'hoist-non-react-statics'>; +} +declare module 'hoist-non-react-statics/index.js' { + declare module.exports: $Exports<'hoist-non-react-statics'>; +} diff --git a/flow-typed/npm/jest_v17.x.x.js b/flow-typed/npm/jest_v20.x.x.js similarity index 71% rename from flow-typed/npm/jest_v17.x.x.js rename to flow-typed/npm/jest_v20.x.x.js index f4c9e5d..0ed2c4b 100644 --- a/flow-typed/npm/jest_v17.x.x.js +++ b/flow-typed/npm/jest_v20.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 269340ea4ca4555368bd144efc3753b4 -// flow-typed version: 2b78d73874/jest_v17.x.x/flow_>=v0.33.x +// flow-typed signature: a0369c11661f437ec4ccdd805579ddcf +// flow-typed version: c4b9fea7c9/jest_v20.x.x/flow_>=v0.33.x type JestMockFn = { (...args: Array): any, @@ -17,7 +17,7 @@ type JestMockFn = { * An array that contains all the object instances that have been * instantiated from this mock function. */ - instances: mixed, + instances: mixed }, /** * Resets all information stored in the mockFn.mock.calls and @@ -30,6 +30,14 @@ type JestMockFn = { * completely restore a mock back to its initial state. */ mockReset(): Function, + /** + * Removes the mock and restores the initial implementation. This is useful + * when you want to mock functions in certain test cases and restore the + * original implementation in others. Beware that mockFn.mockRestore only + * works when mock was created with jest.spyOn. Thus you have to take care of + * restoration yourself when manually assigning jest.fn(). + */ + mockRestore(): Function, /** * Accepts a function that should be used as the implementation of the mock. * The mock itself will still record all calls that go into and instances @@ -54,15 +62,15 @@ type JestMockFn = { /** * Sugar for only returning a value once inside your mock */ - mockReturnValueOnce(value: any): JestMockFn, -} + mockReturnValueOnce(value: any): JestMockFn +}; type JestAsymmetricEqualityType = { /** * A custom Jasmine equality tester */ - asymmetricMatch(value: mixed): boolean, -} + asymmetricMatch(value: mixed): boolean +}; type JestCallsType = { allArgs(): mixed, @@ -71,25 +79,61 @@ type JestCallsType = { count(): number, first(): mixed, mostRecent(): mixed, - reset(): void, -} + reset(): void +}; type JestClockType = { install(): void, mockDate(date: Date): void, - tick(): void, - uninstall(): void, -} + tick(milliseconds?: number): void, + uninstall(): void +}; type JestMatcherResult = { - message?: string | ()=>string, - pass: boolean, -} + message?: string | (() => string), + pass: boolean +}; type JestMatcher = (actual: any, expected: any) => JestMatcherResult; +type JestPromiseType = { + /** + * Use rejects to unwrap the reason of a rejected promise so any other + * matcher can be chained. If the promise is fulfilled the assertion fails. + */ + rejects: JestExpectType, + /** + * Use resolves to unwrap the value of a fulfilled promise so any other + * matcher can be chained. If the promise is rejected the assertion fails. + */ + resolves: JestExpectType +}; + +/** + * Plugin: jest-enzyme + */ +type EnzymeMatchersType = { + toBeChecked(): void, + toBeDisabled(): void, + toBeEmpty(): void, + toBePresent(): void, + toContainReact(element: React$Element): void, + toHaveClassName(className: string): void, + toHaveHTML(html: string): void, + toHaveProp(propKey: string, propValue?: any): void, + toHaveRef(refName: string): void, + toHaveState(stateKey: string, stateValue?: any): void, + toHaveStyle(styleKey: string, styleValue?: any): void, + toHaveTagName(tagName: string): void, + toHaveText(text: string): void, + toIncludeText(text: string): void, + toHaveValue(value: any): void, + toMatchElement(element: React$Element): void, + toMatchSelector(selector: string): void, +}; + type JestExpectType = { - not: JestExpectType, + not: JestExpectType & EnzymeMatchersType, /** * If you have a mock function, you can use .lastCalledWith to test what * arguments it was last called with. @@ -190,29 +234,47 @@ type JestExpectType = { */ toHaveBeenCalledWith(...args: Array): void, /** - * Use .toMatch to check that a string matches a regular expression. + * Use .toHaveBeenLastCalledWith to ensure that a mock function was last called + * with specific arguments. */ - toMatch(regexp: RegExp): void, + toHaveBeenLastCalledWith(...args: Array): void, + /** + * Check that an object has a .length property and it is set to a certain + * numeric value. + */ + toHaveLength(number: number): void, + /** + * + */ + toHaveProperty(propPath: string, value?: any): void, + /** + * Use .toMatch to check that a string matches a regular expression or string. + */ + toMatch(regexpOrString: RegExp | string): void, + /** + * Use .toMatchObject to check that a javascript object matches a subset of the properties of an object. + */ + toMatchObject(object: Object): void, /** * This ensures that a React component matches the most recent snapshot. */ - toMatchSnapshot(): void, + toMatchSnapshot(name?: string): void, /** * Use .toThrow to test that a function throws when it is called. + * If you want to test that a specific error gets thrown, you can provide an + * argument to toThrow. The argument can be a string for the error message, + * a class for the error, or a regex that should match the error. + * + * Alias: .toThrowError */ - toThrow(message?: string | Error): void, - /** - * Use .toThrowError to test that a function throws a specific error when it - * is called. The argument can be a string for the error message, a class for - * the error, or a regex that should match the error. - */ + toThrow(message?: string | Error | RegExp): void, toThrowError(message?: string | Error | RegExp): void, /** * Use .toThrowErrorMatchingSnapshot to test that a function throws a error * matching the most recent snapshot when it is called. */ - toThrowErrorMatchingSnapshot(): void, -} + toThrowErrorMatchingSnapshot(): void +}; type JestObjectType = { /** @@ -234,6 +296,11 @@ type JestObjectType = { * An un-hoisted version of enableAutomock */ autoMockOn(): JestObjectType, + /** + * Clears the mock.calls and mock.instances properties of all mocks. + * Equivalent to calling .mockClear() on every mocked function. + */ + clearAllMocks(): JestObjectType, /** * Resets the state of all mocks. Equivalent to calling .mockReset() on every * mocked function. @@ -276,7 +343,11 @@ type JestObjectType = { * The third argument can be used to create virtual mocks -- mocks of modules * that don't exist anywhere in the system. */ - mock(moduleName: string, moduleFactory?: any): JestObjectType, + mock( + moduleName: string, + moduleFactory?: any, + options?: Object + ): JestObjectType, /** * Resets the module registry - the cache of all required modules. This is * useful to isolate modules where local state might conflict between tests. @@ -329,11 +400,16 @@ type JestObjectType = { * Instructs Jest to use the real versions of the standard timer functions. */ useRealTimers(): JestObjectType, -} + /** + * Creates a mock function similar to jest.fn but also tracks calls to + * object[methodName]. + */ + spyOn(object: Object, methodName: string): JestMockFn +}; type JestSpyType = { - calls: JestCallsType, -} + calls: JestCallsType +}; /** Runs this function after every test inside this context */ declare function afterEach(fn: Function): void; @@ -343,8 +419,25 @@ declare function beforeEach(fn: Function): void; declare function afterAll(fn: Function): void; /** Runs this function before any tests have started inside this context */ declare function beforeAll(fn: Function): void; + /** A context for grouping tests together */ -declare function describe(name: string, fn: Function): void; +declare var describe: { + /** + * Creates a block that groups together several related tests in one "test suite" + */ + (name: string, fn: Function): void, + + /** + * Only run this describe block + */ + only(name: string, fn: Function): void, + + /** + * Skip running this describe block + */ + skip(name: string, fn: Function): void, +}; + /** An individual test unit */ declare var it: { @@ -369,6 +462,13 @@ declare var it: { * @param {Function} Test */ skip(name: string, fn?: Function): ?Promise, + /** + * Run the test concurrently + * + * @param {string} Name of Test + * @param {Function} Test + */ + concurrent(name: string, fn?: Function): ?Promise }; declare function fit(name: string, fn: Function): ?Promise; /** An individual test unit */ @@ -385,9 +485,20 @@ declare var xtest: typeof it; /** The expect function is used every time you want to test a value */ declare var expect: { /** The object that you want to make assertions against */ - (value: any): JestExpectType, + (value: any): JestExpectType & JestPromiseType & EnzymeMatchersType, /** Add additional Jasmine matchers to Jest's roster */ - extend(matchers: {[name:string]: JestMatcher}): void, + extend(matchers: { [name: string]: JestMatcher }): void, + /** Add a module that formats application-specific data structures. */ + addSnapshotSerializer(serializer: (input: Object) => string): void, + assertions(expectedAssertions: number): void, + hasAssertions(): void, + any(value: mixed): JestAsymmetricEqualityType, + anything(): void, + arrayContaining(value: Array): void, + objectContaining(value: Object): void, + /** Matches any received string that contains the exact expected string. */ + stringContaining(value: string): void, + stringMatching(value: string | RegExp): void }; // TODO handle return type @@ -395,7 +506,7 @@ declare var expect: { declare function spyOn(value: mixed, method: string): Object; /** Holds all functions related to manipulating test runner */ -declare var jest: JestObjectType +declare var jest: JestObjectType; /** * The global Jamine object, this is generally not exposed as the public API, @@ -408,6 +519,10 @@ declare var jasmine: { arrayContaining(value: Array): void, clock(): JestClockType, createSpy(name: string): JestSpyType, + createSpyObj( + baseName: string, + methodNames: Array + ): { [methodName: string]: JestSpyType }, objectContaining(value: Object): void, - stringMatching(value: string): void, -} + stringMatching(value: string): void +}; diff --git a/flow-typed/npm/path-to-regexp_vx.x.x.js b/flow-typed/npm/path-to-regexp_vx.x.x.js new file mode 100644 index 0000000..d5b19e6 --- /dev/null +++ b/flow-typed/npm/path-to-regexp_vx.x.x.js @@ -0,0 +1,33 @@ +// flow-typed signature: 0ca9b6466bef8d8a1065047d9b2377ed +// flow-typed version: <>/path-to-regexp_v^1.7.0/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'path-to-regexp' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'path-to-regexp' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ + + +// Filename aliases +declare module 'path-to-regexp/index' { + declare module.exports: $Exports<'path-to-regexp'>; +} +declare module 'path-to-regexp/index.js' { + declare module.exports: $Exports<'path-to-regexp'>; +} diff --git a/flow-typed/npm/prettier-eslint_vx.x.x.js b/flow-typed/npm/prettier-eslint_vx.x.x.js new file mode 100644 index 0000000..91b984f --- /dev/null +++ b/flow-typed/npm/prettier-eslint_vx.x.x.js @@ -0,0 +1,39 @@ +// flow-typed signature: 6ad6e1964ca9ba7f00adea8639590b31 +// flow-typed version: <>/prettier-eslint_v^6.2.2/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'prettier-eslint' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'prettier-eslint' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ +declare module 'prettier-eslint/dist/index' { + declare module.exports: any; +} + +declare module 'prettier-eslint/dist/utils' { + declare module.exports: any; +} + +// Filename aliases +declare module 'prettier-eslint/dist/index.js' { + declare module.exports: $Exports<'prettier-eslint/dist/index'>; +} +declare module 'prettier-eslint/dist/utils.js' { + declare module.exports: $Exports<'prettier-eslint/dist/utils'>; +} diff --git a/flow-typed/npm/prettier_vx.x.x.js b/flow-typed/npm/prettier_vx.x.x.js new file mode 100644 index 0000000..e702c26 --- /dev/null +++ b/flow-typed/npm/prettier_vx.x.x.js @@ -0,0 +1,157 @@ +// flow-typed signature: dcfbb1bce70b2357d74f7cab0391981c +// flow-typed version: <>/prettier_v^1.3.1/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'prettier' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'prettier' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ +declare module 'prettier/bin/prettier' { + declare module.exports: any; +} + +declare module 'prettier/docs/prettier.min' { + declare module.exports: any; +} + +declare module 'prettier/docs/rollup.config' { + declare module.exports: any; +} + +declare module 'prettier/scripts/sync-flow-tests' { + declare module.exports: any; +} + +declare module 'prettier/src/ast-types' { + declare module.exports: any; +} + +declare module 'prettier/src/comments' { + declare module.exports: any; +} + +declare module 'prettier/src/deprecated' { + declare module.exports: any; +} + +declare module 'prettier/src/doc-builders' { + declare module.exports: any; +} + +declare module 'prettier/src/doc-debug' { + declare module.exports: any; +} + +declare module 'prettier/src/doc-printer' { + declare module.exports: any; +} + +declare module 'prettier/src/doc-utils' { + declare module.exports: any; +} + +declare module 'prettier/src/fast-path' { + declare module.exports: any; +} + +declare module 'prettier/src/options' { + declare module.exports: any; +} + +declare module 'prettier/src/parser' { + declare module.exports: any; +} + +declare module 'prettier/src/printer' { + declare module.exports: any; +} + +declare module 'prettier/src/typescript-ast-nodes' { + declare module.exports: any; +} + +declare module 'prettier/src/util' { + declare module.exports: any; +} + +declare module 'prettier/test' { + declare module.exports: any; +} + +// Filename aliases +declare module 'prettier/bin/prettier.js' { + declare module.exports: $Exports<'prettier/bin/prettier'>; +} +declare module 'prettier/docs/prettier.min.js' { + declare module.exports: $Exports<'prettier/docs/prettier.min'>; +} +declare module 'prettier/docs/rollup.config.js' { + declare module.exports: $Exports<'prettier/docs/rollup.config'>; +} +declare module 'prettier/index' { + declare module.exports: $Exports<'prettier'>; +} +declare module 'prettier/index.js' { + declare module.exports: $Exports<'prettier'>; +} +declare module 'prettier/scripts/sync-flow-tests.js' { + declare module.exports: $Exports<'prettier/scripts/sync-flow-tests'>; +} +declare module 'prettier/src/ast-types.js' { + declare module.exports: $Exports<'prettier/src/ast-types'>; +} +declare module 'prettier/src/comments.js' { + declare module.exports: $Exports<'prettier/src/comments'>; +} +declare module 'prettier/src/deprecated.js' { + declare module.exports: $Exports<'prettier/src/deprecated'>; +} +declare module 'prettier/src/doc-builders.js' { + declare module.exports: $Exports<'prettier/src/doc-builders'>; +} +declare module 'prettier/src/doc-debug.js' { + declare module.exports: $Exports<'prettier/src/doc-debug'>; +} +declare module 'prettier/src/doc-printer.js' { + declare module.exports: $Exports<'prettier/src/doc-printer'>; +} +declare module 'prettier/src/doc-utils.js' { + declare module.exports: $Exports<'prettier/src/doc-utils'>; +} +declare module 'prettier/src/fast-path.js' { + declare module.exports: $Exports<'prettier/src/fast-path'>; +} +declare module 'prettier/src/options.js' { + declare module.exports: $Exports<'prettier/src/options'>; +} +declare module 'prettier/src/parser.js' { + declare module.exports: $Exports<'prettier/src/parser'>; +} +declare module 'prettier/src/printer.js' { + declare module.exports: $Exports<'prettier/src/printer'>; +} +declare module 'prettier/src/typescript-ast-nodes.js' { + declare module.exports: $Exports<'prettier/src/typescript-ast-nodes'>; +} +declare module 'prettier/src/util.js' { + declare module.exports: $Exports<'prettier/src/util'>; +} +declare module 'prettier/test.js' { + declare module.exports: $Exports<'prettier/test'>; +} diff --git a/flow-typed/npm/prop-types_v15.x.x.js b/flow-typed/npm/prop-types_v15.x.x.js new file mode 100644 index 0000000..113b0b5 --- /dev/null +++ b/flow-typed/npm/prop-types_v15.x.x.js @@ -0,0 +1,34 @@ +// flow-typed signature: 3eaa1f24c7397b78a7481992d2cddcb2 +// flow-typed version: a1a20d4928/prop-types_v15.x.x/flow_>=v0.41.x + +type $npm$propTypes$ReactPropsCheckType = ( + props: any, + propName: string, + componentName: string, + href?: string) => ?Error; + +declare module 'prop-types' { + declare var array: React$PropType$Primitive>; + declare var bool: React$PropType$Primitive; + declare var func: React$PropType$Primitive; + declare var number: React$PropType$Primitive; + declare var object: React$PropType$Primitive; + declare var string: React$PropType$Primitive; + declare var any: React$PropType$Primitive; + declare var arrayOf: React$PropType$ArrayOf; + declare var element: React$PropType$Primitive; /* TODO */ + declare var instanceOf: React$PropType$InstanceOf; + declare var node: React$PropType$Primitive; /* TODO */ + declare var objectOf: React$PropType$ObjectOf; + declare var oneOf: React$PropType$OneOf; + declare var oneOfType: React$PropType$OneOfType; + declare var shape: React$PropType$Shape; + + declare function checkPropTypes( + propTypes: $Subtype<{[_: $Keys]: $npm$propTypes$ReactPropsCheckType}>, + values: V, + location: string, + componentName: string, + getStack: ?(() => ?string) + ) : void; +} diff --git a/flow-typed/npm/react-native-drawer-layout-polyfill_vx.x.x.js b/flow-typed/npm/react-native-drawer-layout-polyfill_vx.x.x.js new file mode 100644 index 0000000..ac06175 --- /dev/null +++ b/flow-typed/npm/react-native-drawer-layout-polyfill_vx.x.x.js @@ -0,0 +1,39 @@ +// flow-typed signature: 3b2ac23940c896d7c1cfe61602fdb75d +// flow-typed version: <>/react-native-drawer-layout-polyfill_v^1.3.1/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'react-native-drawer-layout-polyfill' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'react-native-drawer-layout-polyfill' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ +declare module 'react-native-drawer-layout-polyfill/dist/index.android' { + declare module.exports: any; +} + +declare module 'react-native-drawer-layout-polyfill/dist/index' { + declare module.exports: any; +} + +// Filename aliases +declare module 'react-native-drawer-layout-polyfill/dist/index.android.js' { + declare module.exports: $Exports<'react-native-drawer-layout-polyfill/dist/index.android'>; +} +declare module 'react-native-drawer-layout-polyfill/dist/index.js' { + declare module.exports: $Exports<'react-native-drawer-layout-polyfill/dist/index'>; +} diff --git a/flow-typed/npm/react-native-tab-view_vx.x.x.js b/flow-typed/npm/react-native-tab-view_vx.x.x.js new file mode 100644 index 0000000..67ce0b0 --- /dev/null +++ b/flow-typed/npm/react-native-tab-view_vx.x.x.js @@ -0,0 +1,95 @@ +// flow-typed signature: 2b6973f23a98d68b4e4cb18e5d8dd470 +// flow-typed version: <>/react-native-tab-view_v^0.0.66/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'react-native-tab-view' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'react-native-tab-view' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ +declare module 'react-native-tab-view/src/index' { + declare module.exports: any; +} + +declare module 'react-native-tab-view/src/SceneMap' { + declare module.exports: any; +} + +declare module 'react-native-tab-view/src/TabBar' { + declare module.exports: any; +} + +declare module 'react-native-tab-view/src/TabViewAnimated' { + declare module.exports: any; +} + +declare module 'react-native-tab-view/src/TabViewPagerAndroid' { + declare module.exports: any; +} + +declare module 'react-native-tab-view/src/TabViewPagerPan' { + declare module.exports: any; +} + +declare module 'react-native-tab-view/src/TabViewPagerScroll' { + declare module.exports: any; +} + +declare module 'react-native-tab-view/src/TabViewPropTypes' { + declare module.exports: any; +} + +declare module 'react-native-tab-view/src/TabViewTypeDefinitions' { + declare module.exports: any; +} + +declare module 'react-native-tab-view/src/TouchableItem' { + declare module.exports: any; +} + +// Filename aliases +declare module 'react-native-tab-view/src/index.js' { + declare module.exports: $Exports<'react-native-tab-view/src/index'>; +} +declare module 'react-native-tab-view/src/SceneMap.js' { + declare module.exports: $Exports<'react-native-tab-view/src/SceneMap'>; +} +declare module 'react-native-tab-view/src/TabBar.js' { + declare module.exports: $Exports<'react-native-tab-view/src/TabBar'>; +} +declare module 'react-native-tab-view/src/TabViewAnimated.js' { + declare module.exports: $Exports<'react-native-tab-view/src/TabViewAnimated'>; +} +declare module 'react-native-tab-view/src/TabViewPagerAndroid.js' { + declare module.exports: $Exports<'react-native-tab-view/src/TabViewPagerAndroid'>; +} +declare module 'react-native-tab-view/src/TabViewPagerPan.js' { + declare module.exports: $Exports<'react-native-tab-view/src/TabViewPagerPan'>; +} +declare module 'react-native-tab-view/src/TabViewPagerScroll.js' { + declare module.exports: $Exports<'react-native-tab-view/src/TabViewPagerScroll'>; +} +declare module 'react-native-tab-view/src/TabViewPropTypes.js' { + declare module.exports: $Exports<'react-native-tab-view/src/TabViewPropTypes'>; +} +declare module 'react-native-tab-view/src/TabViewTypeDefinitions.js' { + declare module.exports: $Exports<'react-native-tab-view/src/TabViewTypeDefinitions'>; +} +declare module 'react-native-tab-view/src/TouchableItem.js' { + declare module.exports: $Exports<'react-native-tab-view/src/TouchableItem'>; +} diff --git a/flow-typed/npm/react-native-vector-icons_vx.x.x.js b/flow-typed/npm/react-native-vector-icons_vx.x.x.js new file mode 100644 index 0000000..8eced5c --- /dev/null +++ b/flow-typed/npm/react-native-vector-icons_vx.x.x.js @@ -0,0 +1,185 @@ +// flow-typed signature: c0ba677d8ab5e8dd20aca1fa1514abe7 +// flow-typed version: <>/react-native-vector-icons_v^4.1.1/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'react-native-vector-icons' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'react-native-vector-icons' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ +declare module 'react-native-vector-icons/Entypo' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/EvilIcons' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/FontAwesome' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/Foundation' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/generate-icon' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/generate-material-icons' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/Ionicons' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/lib/create-icon-set-from-fontello' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/lib/create-icon-set-from-icomoon' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/lib/create-icon-set' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/lib/generate-icon-set-from-css' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/lib/icon-button' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/lib/react-native' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/lib/react-native.osx' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/lib/tab-bar-item-ios' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/lib/toolbar-android' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/MaterialCommunityIcons' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/MaterialIcons' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/Octicons' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/RNIMigration' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/SimpleLineIcons' { + declare module.exports: any; +} + +declare module 'react-native-vector-icons/Zocial' { + declare module.exports: any; +} + +// Filename aliases +declare module 'react-native-vector-icons/Entypo.js' { + declare module.exports: $Exports<'react-native-vector-icons/Entypo'>; +} +declare module 'react-native-vector-icons/EvilIcons.js' { + declare module.exports: $Exports<'react-native-vector-icons/EvilIcons'>; +} +declare module 'react-native-vector-icons/FontAwesome.js' { + declare module.exports: $Exports<'react-native-vector-icons/FontAwesome'>; +} +declare module 'react-native-vector-icons/Foundation.js' { + declare module.exports: $Exports<'react-native-vector-icons/Foundation'>; +} +declare module 'react-native-vector-icons/generate-icon.js' { + declare module.exports: $Exports<'react-native-vector-icons/generate-icon'>; +} +declare module 'react-native-vector-icons/generate-material-icons.js' { + declare module.exports: $Exports<'react-native-vector-icons/generate-material-icons'>; +} +declare module 'react-native-vector-icons/index' { + declare module.exports: $Exports<'react-native-vector-icons'>; +} +declare module 'react-native-vector-icons/index.js' { + declare module.exports: $Exports<'react-native-vector-icons'>; +} +declare module 'react-native-vector-icons/Ionicons.js' { + declare module.exports: $Exports<'react-native-vector-icons/Ionicons'>; +} +declare module 'react-native-vector-icons/lib/create-icon-set-from-fontello.js' { + declare module.exports: $Exports<'react-native-vector-icons/lib/create-icon-set-from-fontello'>; +} +declare module 'react-native-vector-icons/lib/create-icon-set-from-icomoon.js' { + declare module.exports: $Exports<'react-native-vector-icons/lib/create-icon-set-from-icomoon'>; +} +declare module 'react-native-vector-icons/lib/create-icon-set.js' { + declare module.exports: $Exports<'react-native-vector-icons/lib/create-icon-set'>; +} +declare module 'react-native-vector-icons/lib/generate-icon-set-from-css.js' { + declare module.exports: $Exports<'react-native-vector-icons/lib/generate-icon-set-from-css'>; +} +declare module 'react-native-vector-icons/lib/icon-button.js' { + declare module.exports: $Exports<'react-native-vector-icons/lib/icon-button'>; +} +declare module 'react-native-vector-icons/lib/react-native.js' { + declare module.exports: $Exports<'react-native-vector-icons/lib/react-native'>; +} +declare module 'react-native-vector-icons/lib/react-native.osx.js' { + declare module.exports: $Exports<'react-native-vector-icons/lib/react-native.osx'>; +} +declare module 'react-native-vector-icons/lib/tab-bar-item-ios.js' { + declare module.exports: $Exports<'react-native-vector-icons/lib/tab-bar-item-ios'>; +} +declare module 'react-native-vector-icons/lib/toolbar-android.js' { + declare module.exports: $Exports<'react-native-vector-icons/lib/toolbar-android'>; +} +declare module 'react-native-vector-icons/MaterialCommunityIcons.js' { + declare module.exports: $Exports<'react-native-vector-icons/MaterialCommunityIcons'>; +} +declare module 'react-native-vector-icons/MaterialIcons.js' { + declare module.exports: $Exports<'react-native-vector-icons/MaterialIcons'>; +} +declare module 'react-native-vector-icons/Octicons.js' { + declare module.exports: $Exports<'react-native-vector-icons/Octicons'>; +} +declare module 'react-native-vector-icons/RNIMigration.js' { + declare module.exports: $Exports<'react-native-vector-icons/RNIMigration'>; +} +declare module 'react-native-vector-icons/SimpleLineIcons.js' { + declare module.exports: $Exports<'react-native-vector-icons/SimpleLineIcons'>; +} +declare module 'react-native-vector-icons/Zocial.js' { + declare module.exports: $Exports<'react-native-vector-icons/Zocial'>; +} diff --git a/flow-typed/npm/react-test-renderer_vx.x.x.js b/flow-typed/npm/react-test-renderer_vx.x.x.js new file mode 100644 index 0000000..9a46a3f --- /dev/null +++ b/flow-typed/npm/react-test-renderer_vx.x.x.js @@ -0,0 +1,1760 @@ +// flow-typed signature: 14e644999623c52440ec6fbefa0d2422 +// flow-typed version: <>/react-test-renderer_v^15.4.2/flow_v0.49.1 + +/** + * This is an autogenerated libdef stub for: + * + * 'react-test-renderer' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module 'react-test-renderer' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ +declare module 'react-test-renderer/lib/accumulate' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/accumulateInto' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/adler32' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/CallbackQueue' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/canDefineProperty' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/checkReactTypeSpec' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/deprecated' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/EventConstants' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/EventPluginHub' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/EventPluginRegistry' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/EventPluginUtils' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/EventPropagators' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/flattenChildren' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/forEachAccumulated' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/getHostComponentFromComposite' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/getIteratorFn' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/instantiateReactComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/isTextInputElement' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/KeyEscapeUtils' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/PluginModuleType' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/PooledClass' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactChildFiber' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactChildReconciler' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactComponentEnvironment' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactCompositeComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactCoroutine' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactDebugTool' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactDefaultBatchingStrategy' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactElementSymbol' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactEmptyComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactErrorUtils' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactEventEmitterMixin' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactFeatureFlags' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactFiber' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactFiberBeginWork' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactFiberCommitWork' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactFiberCompleteWork' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactFiberReconciler' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactFiberRoot' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactFiberScheduler' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactFiberUpdateQueue' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactHostComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactHostOperationHistoryHook' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactInstanceMap' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactInstanceType' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactInstrumentation' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactInvalidSetStateWarningHook' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactMultiChild' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactMultiChildUpdateTypes' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactNodeTypes' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactOwner' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactPerf' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactPriorityLevel' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/reactProdInvariant' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactPropTypeLocationNames' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactPropTypeLocations' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactPropTypesSecret' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactReconciler' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactRef' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactReifiedYield' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactShallowRenderer' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactSimpleEmptyComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactSyntheticEventType' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactTestEmptyComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactTestMount' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactTestReconcileTransaction' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactTestRenderer' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactTestTextComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactTypeOfWork' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactTypes' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactUpdateQueue' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactUpdates' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ReactVersion' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ResponderEventPlugin' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ResponderSyntheticEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/ResponderTouchHistoryStore' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/accumulate' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/accumulateInto' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/adler32' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ARIADOMPropertyConfig' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/AutoFocusUtils' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/BeforeInputEventPlugin' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/CallbackQueue' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/canDefineProperty' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ChangeEventPlugin' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/checkReactTypeSpec' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/createMicrosoftUnsafeLocalFunction' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/CSSProperty' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/CSSPropertyOperations' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/Danger' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/dangerousStyleValue' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/DefaultEventPluginOrder' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/deprecated' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/DOMChildrenOperations' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/DOMLazyTree' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/DOMNamespaces' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/DOMProperty' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/DOMPropertyOperations' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/EnterLeaveEventPlugin' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/escapeTextContentForBrowser' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/EventConstants' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/EventPluginHub' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/EventPluginRegistry' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/EventPluginUtils' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/EventPropagators' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/FallbackCompositionState' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/findDOMNode' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/flattenChildren' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/forEachAccumulated' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/getEventCharCode' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/getEventKey' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/getEventModifierState' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/getEventTarget' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/getHostComponentFromComposite' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/getIteratorFn' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/getNodeForCharacterOffset' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/getTextContentAccessor' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/getVendorPrefixedEventName' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/HTMLDOMPropertyConfig' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/instantiateReactComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/isEventSupported' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/isTextInputElement' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/KeyEscapeUtils' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/LinkedValueUtils' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/PluginModuleType' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/PooledClass' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/quoteAttributeValueForBrowser' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactBrowserEventEmitter' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactChildFiber' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactChildReconciler' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactComponentBrowserEnvironment' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactComponentEnvironment' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactCompositeComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactCoroutine' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDebugTool' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDefaultBatchingStrategy' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDefaultInjection' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOM' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMComponentFlags' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMComponentTree' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMContainerInfo' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMEmptyComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMFeatureFlags' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMFiber' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMIDOperations' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMInput' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMInvalidARIAHook' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMNullInputValuePropHook' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMOption' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMSelect' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMSelection' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMServer' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMTextarea' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMTextComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMTreeTraversal' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactDOMUnknownPropertyHook' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactElementSymbol' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactEmptyComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactErrorUtils' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactEventEmitterMixin' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactEventListener' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactFeatureFlags' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactFiber' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactFiberBeginWork' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactFiberCommitWork' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactFiberCompleteWork' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactFiberReconciler' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactFiberRoot' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactFiberScheduler' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactFiberUpdateQueue' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactHostComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactHostOperationHistoryHook' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactInjection' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactInputSelection' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactInstanceMap' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactInstanceType' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactInstrumentation' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactInvalidSetStateWarningHook' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactMarkupChecksum' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactMount' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactMultiChild' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactMultiChildUpdateTypes' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactNodeTypes' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactOwner' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactPerf' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactPriorityLevel' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/reactProdInvariant' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactPropTypeLocationNames' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactPropTypeLocations' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactPropTypesSecret' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactReconciler' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactReconcileTransaction' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactRef' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactReifiedYield' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactServerBatchingStrategy' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactServerRendering' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactServerRenderingTransaction' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactServerUpdateQueue' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactShallowRenderer' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactSimpleEmptyComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactSyntheticEventType' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactTestEmptyComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactTestMount' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactTestReconcileTransaction' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactTestRenderer' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactTestTextComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactTypeOfWork' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactTypes' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactUpdateQueue' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactUpdates' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ReactVersion' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/renderSubtreeIntoContainer' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ResponderEventPlugin' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ResponderSyntheticEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ResponderTouchHistoryStore' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SelectEventPlugin' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/setInnerHTML' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/setTextContent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/shouldUpdateReactComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SimpleEventPlugin' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SVGDOMPropertyConfig' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticAnimationEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticClipboardEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticCompositionEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticDragEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticFocusEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticInputEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticKeyboardEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticMouseEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticTouchEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticTransitionEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticUIEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/SyntheticWheelEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/TapEventPlugin' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/TouchHistoryMath' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/Transaction' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/traverseAllChildren' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/validateDOMNesting' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shallow/ViewportMetrics' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/shouldUpdateReactComponent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/SyntheticEvent' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/TouchHistoryMath' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/Transaction' { + declare module.exports: any; +} + +declare module 'react-test-renderer/lib/traverseAllChildren' { + declare module.exports: any; +} + +declare module 'react-test-renderer/shallow' { + declare module.exports: any; +} + +// Filename aliases +declare module 'react-test-renderer/index' { + declare module.exports: $Exports<'react-test-renderer'>; +} +declare module 'react-test-renderer/index.js' { + declare module.exports: $Exports<'react-test-renderer'>; +} +declare module 'react-test-renderer/lib/accumulate.js' { + declare module.exports: $Exports<'react-test-renderer/lib/accumulate'>; +} +declare module 'react-test-renderer/lib/accumulateInto.js' { + declare module.exports: $Exports<'react-test-renderer/lib/accumulateInto'>; +} +declare module 'react-test-renderer/lib/adler32.js' { + declare module.exports: $Exports<'react-test-renderer/lib/adler32'>; +} +declare module 'react-test-renderer/lib/CallbackQueue.js' { + declare module.exports: $Exports<'react-test-renderer/lib/CallbackQueue'>; +} +declare module 'react-test-renderer/lib/canDefineProperty.js' { + declare module.exports: $Exports<'react-test-renderer/lib/canDefineProperty'>; +} +declare module 'react-test-renderer/lib/checkReactTypeSpec.js' { + declare module.exports: $Exports<'react-test-renderer/lib/checkReactTypeSpec'>; +} +declare module 'react-test-renderer/lib/deprecated.js' { + declare module.exports: $Exports<'react-test-renderer/lib/deprecated'>; +} +declare module 'react-test-renderer/lib/EventConstants.js' { + declare module.exports: $Exports<'react-test-renderer/lib/EventConstants'>; +} +declare module 'react-test-renderer/lib/EventPluginHub.js' { + declare module.exports: $Exports<'react-test-renderer/lib/EventPluginHub'>; +} +declare module 'react-test-renderer/lib/EventPluginRegistry.js' { + declare module.exports: $Exports<'react-test-renderer/lib/EventPluginRegistry'>; +} +declare module 'react-test-renderer/lib/EventPluginUtils.js' { + declare module.exports: $Exports<'react-test-renderer/lib/EventPluginUtils'>; +} +declare module 'react-test-renderer/lib/EventPropagators.js' { + declare module.exports: $Exports<'react-test-renderer/lib/EventPropagators'>; +} +declare module 'react-test-renderer/lib/flattenChildren.js' { + declare module.exports: $Exports<'react-test-renderer/lib/flattenChildren'>; +} +declare module 'react-test-renderer/lib/forEachAccumulated.js' { + declare module.exports: $Exports<'react-test-renderer/lib/forEachAccumulated'>; +} +declare module 'react-test-renderer/lib/getHostComponentFromComposite.js' { + declare module.exports: $Exports<'react-test-renderer/lib/getHostComponentFromComposite'>; +} +declare module 'react-test-renderer/lib/getIteratorFn.js' { + declare module.exports: $Exports<'react-test-renderer/lib/getIteratorFn'>; +} +declare module 'react-test-renderer/lib/instantiateReactComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/instantiateReactComponent'>; +} +declare module 'react-test-renderer/lib/isTextInputElement.js' { + declare module.exports: $Exports<'react-test-renderer/lib/isTextInputElement'>; +} +declare module 'react-test-renderer/lib/KeyEscapeUtils.js' { + declare module.exports: $Exports<'react-test-renderer/lib/KeyEscapeUtils'>; +} +declare module 'react-test-renderer/lib/PluginModuleType.js' { + declare module.exports: $Exports<'react-test-renderer/lib/PluginModuleType'>; +} +declare module 'react-test-renderer/lib/PooledClass.js' { + declare module.exports: $Exports<'react-test-renderer/lib/PooledClass'>; +} +declare module 'react-test-renderer/lib/ReactChildFiber.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactChildFiber'>; +} +declare module 'react-test-renderer/lib/ReactChildReconciler.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactChildReconciler'>; +} +declare module 'react-test-renderer/lib/ReactComponentEnvironment.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactComponentEnvironment'>; +} +declare module 'react-test-renderer/lib/ReactCompositeComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactCompositeComponent'>; +} +declare module 'react-test-renderer/lib/ReactCoroutine.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactCoroutine'>; +} +declare module 'react-test-renderer/lib/ReactDebugTool.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactDebugTool'>; +} +declare module 'react-test-renderer/lib/ReactDefaultBatchingStrategy.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactDefaultBatchingStrategy'>; +} +declare module 'react-test-renderer/lib/ReactElementSymbol.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactElementSymbol'>; +} +declare module 'react-test-renderer/lib/ReactEmptyComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactEmptyComponent'>; +} +declare module 'react-test-renderer/lib/ReactErrorUtils.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactErrorUtils'>; +} +declare module 'react-test-renderer/lib/ReactEventEmitterMixin.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactEventEmitterMixin'>; +} +declare module 'react-test-renderer/lib/ReactFeatureFlags.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactFeatureFlags'>; +} +declare module 'react-test-renderer/lib/ReactFiber.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactFiber'>; +} +declare module 'react-test-renderer/lib/ReactFiberBeginWork.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactFiberBeginWork'>; +} +declare module 'react-test-renderer/lib/ReactFiberCommitWork.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactFiberCommitWork'>; +} +declare module 'react-test-renderer/lib/ReactFiberCompleteWork.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactFiberCompleteWork'>; +} +declare module 'react-test-renderer/lib/ReactFiberReconciler.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactFiberReconciler'>; +} +declare module 'react-test-renderer/lib/ReactFiberRoot.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactFiberRoot'>; +} +declare module 'react-test-renderer/lib/ReactFiberScheduler.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactFiberScheduler'>; +} +declare module 'react-test-renderer/lib/ReactFiberUpdateQueue.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactFiberUpdateQueue'>; +} +declare module 'react-test-renderer/lib/ReactHostComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactHostComponent'>; +} +declare module 'react-test-renderer/lib/ReactHostOperationHistoryHook.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactHostOperationHistoryHook'>; +} +declare module 'react-test-renderer/lib/ReactInstanceMap.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactInstanceMap'>; +} +declare module 'react-test-renderer/lib/ReactInstanceType.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactInstanceType'>; +} +declare module 'react-test-renderer/lib/ReactInstrumentation.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactInstrumentation'>; +} +declare module 'react-test-renderer/lib/ReactInvalidSetStateWarningHook.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactInvalidSetStateWarningHook'>; +} +declare module 'react-test-renderer/lib/ReactMultiChild.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactMultiChild'>; +} +declare module 'react-test-renderer/lib/ReactMultiChildUpdateTypes.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactMultiChildUpdateTypes'>; +} +declare module 'react-test-renderer/lib/ReactNodeTypes.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactNodeTypes'>; +} +declare module 'react-test-renderer/lib/ReactOwner.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactOwner'>; +} +declare module 'react-test-renderer/lib/ReactPerf.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactPerf'>; +} +declare module 'react-test-renderer/lib/ReactPriorityLevel.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactPriorityLevel'>; +} +declare module 'react-test-renderer/lib/reactProdInvariant.js' { + declare module.exports: $Exports<'react-test-renderer/lib/reactProdInvariant'>; +} +declare module 'react-test-renderer/lib/ReactPropTypeLocationNames.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactPropTypeLocationNames'>; +} +declare module 'react-test-renderer/lib/ReactPropTypeLocations.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactPropTypeLocations'>; +} +declare module 'react-test-renderer/lib/ReactPropTypesSecret.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactPropTypesSecret'>; +} +declare module 'react-test-renderer/lib/ReactReconciler.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactReconciler'>; +} +declare module 'react-test-renderer/lib/ReactRef.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactRef'>; +} +declare module 'react-test-renderer/lib/ReactReifiedYield.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactReifiedYield'>; +} +declare module 'react-test-renderer/lib/ReactShallowRenderer.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactShallowRenderer'>; +} +declare module 'react-test-renderer/lib/ReactSimpleEmptyComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactSimpleEmptyComponent'>; +} +declare module 'react-test-renderer/lib/ReactSyntheticEventType.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactSyntheticEventType'>; +} +declare module 'react-test-renderer/lib/ReactTestEmptyComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactTestEmptyComponent'>; +} +declare module 'react-test-renderer/lib/ReactTestMount.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactTestMount'>; +} +declare module 'react-test-renderer/lib/ReactTestReconcileTransaction.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactTestReconcileTransaction'>; +} +declare module 'react-test-renderer/lib/ReactTestRenderer.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactTestRenderer'>; +} +declare module 'react-test-renderer/lib/ReactTestTextComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactTestTextComponent'>; +} +declare module 'react-test-renderer/lib/ReactTypeOfWork.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactTypeOfWork'>; +} +declare module 'react-test-renderer/lib/ReactTypes.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactTypes'>; +} +declare module 'react-test-renderer/lib/ReactUpdateQueue.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactUpdateQueue'>; +} +declare module 'react-test-renderer/lib/ReactUpdates.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactUpdates'>; +} +declare module 'react-test-renderer/lib/ReactVersion.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ReactVersion'>; +} +declare module 'react-test-renderer/lib/ResponderEventPlugin.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ResponderEventPlugin'>; +} +declare module 'react-test-renderer/lib/ResponderSyntheticEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ResponderSyntheticEvent'>; +} +declare module 'react-test-renderer/lib/ResponderTouchHistoryStore.js' { + declare module.exports: $Exports<'react-test-renderer/lib/ResponderTouchHistoryStore'>; +} +declare module 'react-test-renderer/lib/shallow/accumulate.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/accumulate'>; +} +declare module 'react-test-renderer/lib/shallow/accumulateInto.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/accumulateInto'>; +} +declare module 'react-test-renderer/lib/shallow/adler32.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/adler32'>; +} +declare module 'react-test-renderer/lib/shallow/ARIADOMPropertyConfig.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ARIADOMPropertyConfig'>; +} +declare module 'react-test-renderer/lib/shallow/AutoFocusUtils.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/AutoFocusUtils'>; +} +declare module 'react-test-renderer/lib/shallow/BeforeInputEventPlugin.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/BeforeInputEventPlugin'>; +} +declare module 'react-test-renderer/lib/shallow/CallbackQueue.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/CallbackQueue'>; +} +declare module 'react-test-renderer/lib/shallow/canDefineProperty.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/canDefineProperty'>; +} +declare module 'react-test-renderer/lib/shallow/ChangeEventPlugin.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ChangeEventPlugin'>; +} +declare module 'react-test-renderer/lib/shallow/checkReactTypeSpec.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/checkReactTypeSpec'>; +} +declare module 'react-test-renderer/lib/shallow/createMicrosoftUnsafeLocalFunction.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/createMicrosoftUnsafeLocalFunction'>; +} +declare module 'react-test-renderer/lib/shallow/CSSProperty.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/CSSProperty'>; +} +declare module 'react-test-renderer/lib/shallow/CSSPropertyOperations.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/CSSPropertyOperations'>; +} +declare module 'react-test-renderer/lib/shallow/Danger.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/Danger'>; +} +declare module 'react-test-renderer/lib/shallow/dangerousStyleValue.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/dangerousStyleValue'>; +} +declare module 'react-test-renderer/lib/shallow/DefaultEventPluginOrder.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/DefaultEventPluginOrder'>; +} +declare module 'react-test-renderer/lib/shallow/deprecated.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/deprecated'>; +} +declare module 'react-test-renderer/lib/shallow/DOMChildrenOperations.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/DOMChildrenOperations'>; +} +declare module 'react-test-renderer/lib/shallow/DOMLazyTree.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/DOMLazyTree'>; +} +declare module 'react-test-renderer/lib/shallow/DOMNamespaces.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/DOMNamespaces'>; +} +declare module 'react-test-renderer/lib/shallow/DOMProperty.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/DOMProperty'>; +} +declare module 'react-test-renderer/lib/shallow/DOMPropertyOperations.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/DOMPropertyOperations'>; +} +declare module 'react-test-renderer/lib/shallow/EnterLeaveEventPlugin.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/EnterLeaveEventPlugin'>; +} +declare module 'react-test-renderer/lib/shallow/escapeTextContentForBrowser.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/escapeTextContentForBrowser'>; +} +declare module 'react-test-renderer/lib/shallow/EventConstants.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/EventConstants'>; +} +declare module 'react-test-renderer/lib/shallow/EventPluginHub.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/EventPluginHub'>; +} +declare module 'react-test-renderer/lib/shallow/EventPluginRegistry.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/EventPluginRegistry'>; +} +declare module 'react-test-renderer/lib/shallow/EventPluginUtils.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/EventPluginUtils'>; +} +declare module 'react-test-renderer/lib/shallow/EventPropagators.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/EventPropagators'>; +} +declare module 'react-test-renderer/lib/shallow/FallbackCompositionState.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/FallbackCompositionState'>; +} +declare module 'react-test-renderer/lib/shallow/findDOMNode.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/findDOMNode'>; +} +declare module 'react-test-renderer/lib/shallow/flattenChildren.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/flattenChildren'>; +} +declare module 'react-test-renderer/lib/shallow/forEachAccumulated.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/forEachAccumulated'>; +} +declare module 'react-test-renderer/lib/shallow/getEventCharCode.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/getEventCharCode'>; +} +declare module 'react-test-renderer/lib/shallow/getEventKey.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/getEventKey'>; +} +declare module 'react-test-renderer/lib/shallow/getEventModifierState.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/getEventModifierState'>; +} +declare module 'react-test-renderer/lib/shallow/getEventTarget.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/getEventTarget'>; +} +declare module 'react-test-renderer/lib/shallow/getHostComponentFromComposite.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/getHostComponentFromComposite'>; +} +declare module 'react-test-renderer/lib/shallow/getIteratorFn.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/getIteratorFn'>; +} +declare module 'react-test-renderer/lib/shallow/getNodeForCharacterOffset.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/getNodeForCharacterOffset'>; +} +declare module 'react-test-renderer/lib/shallow/getTextContentAccessor.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/getTextContentAccessor'>; +} +declare module 'react-test-renderer/lib/shallow/getVendorPrefixedEventName.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/getVendorPrefixedEventName'>; +} +declare module 'react-test-renderer/lib/shallow/HTMLDOMPropertyConfig.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/HTMLDOMPropertyConfig'>; +} +declare module 'react-test-renderer/lib/shallow/instantiateReactComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/instantiateReactComponent'>; +} +declare module 'react-test-renderer/lib/shallow/isEventSupported.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/isEventSupported'>; +} +declare module 'react-test-renderer/lib/shallow/isTextInputElement.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/isTextInputElement'>; +} +declare module 'react-test-renderer/lib/shallow/KeyEscapeUtils.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/KeyEscapeUtils'>; +} +declare module 'react-test-renderer/lib/shallow/LinkedValueUtils.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/LinkedValueUtils'>; +} +declare module 'react-test-renderer/lib/shallow/PluginModuleType.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/PluginModuleType'>; +} +declare module 'react-test-renderer/lib/shallow/PooledClass.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/PooledClass'>; +} +declare module 'react-test-renderer/lib/shallow/quoteAttributeValueForBrowser.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/quoteAttributeValueForBrowser'>; +} +declare module 'react-test-renderer/lib/shallow/ReactBrowserEventEmitter.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactBrowserEventEmitter'>; +} +declare module 'react-test-renderer/lib/shallow/ReactChildFiber.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactChildFiber'>; +} +declare module 'react-test-renderer/lib/shallow/ReactChildReconciler.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactChildReconciler'>; +} +declare module 'react-test-renderer/lib/shallow/ReactComponentBrowserEnvironment.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactComponentBrowserEnvironment'>; +} +declare module 'react-test-renderer/lib/shallow/ReactComponentEnvironment.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactComponentEnvironment'>; +} +declare module 'react-test-renderer/lib/shallow/ReactCompositeComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactCompositeComponent'>; +} +declare module 'react-test-renderer/lib/shallow/ReactCoroutine.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactCoroutine'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDebugTool.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDebugTool'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDefaultBatchingStrategy.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDefaultBatchingStrategy'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDefaultInjection.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDefaultInjection'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOM.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOM'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMComponent'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMComponentFlags.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMComponentFlags'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMComponentTree.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMComponentTree'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMContainerInfo.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMContainerInfo'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMEmptyComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMEmptyComponent'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMFeatureFlags.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMFeatureFlags'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMFiber.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMFiber'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMIDOperations.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMIDOperations'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMInput.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMInput'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMInvalidARIAHook.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMInvalidARIAHook'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMNullInputValuePropHook.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMNullInputValuePropHook'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMOption.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMOption'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMSelect.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMSelect'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMSelection.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMSelection'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMServer.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMServer'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMTextarea.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMTextarea'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMTextComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMTextComponent'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMTreeTraversal.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMTreeTraversal'>; +} +declare module 'react-test-renderer/lib/shallow/ReactDOMUnknownPropertyHook.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactDOMUnknownPropertyHook'>; +} +declare module 'react-test-renderer/lib/shallow/ReactElementSymbol.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactElementSymbol'>; +} +declare module 'react-test-renderer/lib/shallow/ReactEmptyComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactEmptyComponent'>; +} +declare module 'react-test-renderer/lib/shallow/ReactErrorUtils.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactErrorUtils'>; +} +declare module 'react-test-renderer/lib/shallow/ReactEventEmitterMixin.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactEventEmitterMixin'>; +} +declare module 'react-test-renderer/lib/shallow/ReactEventListener.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactEventListener'>; +} +declare module 'react-test-renderer/lib/shallow/ReactFeatureFlags.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactFeatureFlags'>; +} +declare module 'react-test-renderer/lib/shallow/ReactFiber.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactFiber'>; +} +declare module 'react-test-renderer/lib/shallow/ReactFiberBeginWork.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactFiberBeginWork'>; +} +declare module 'react-test-renderer/lib/shallow/ReactFiberCommitWork.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactFiberCommitWork'>; +} +declare module 'react-test-renderer/lib/shallow/ReactFiberCompleteWork.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactFiberCompleteWork'>; +} +declare module 'react-test-renderer/lib/shallow/ReactFiberReconciler.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactFiberReconciler'>; +} +declare module 'react-test-renderer/lib/shallow/ReactFiberRoot.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactFiberRoot'>; +} +declare module 'react-test-renderer/lib/shallow/ReactFiberScheduler.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactFiberScheduler'>; +} +declare module 'react-test-renderer/lib/shallow/ReactFiberUpdateQueue.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactFiberUpdateQueue'>; +} +declare module 'react-test-renderer/lib/shallow/ReactHostComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactHostComponent'>; +} +declare module 'react-test-renderer/lib/shallow/ReactHostOperationHistoryHook.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactHostOperationHistoryHook'>; +} +declare module 'react-test-renderer/lib/shallow/ReactInjection.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactInjection'>; +} +declare module 'react-test-renderer/lib/shallow/ReactInputSelection.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactInputSelection'>; +} +declare module 'react-test-renderer/lib/shallow/ReactInstanceMap.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactInstanceMap'>; +} +declare module 'react-test-renderer/lib/shallow/ReactInstanceType.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactInstanceType'>; +} +declare module 'react-test-renderer/lib/shallow/ReactInstrumentation.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactInstrumentation'>; +} +declare module 'react-test-renderer/lib/shallow/ReactInvalidSetStateWarningHook.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactInvalidSetStateWarningHook'>; +} +declare module 'react-test-renderer/lib/shallow/ReactMarkupChecksum.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactMarkupChecksum'>; +} +declare module 'react-test-renderer/lib/shallow/ReactMount.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactMount'>; +} +declare module 'react-test-renderer/lib/shallow/ReactMultiChild.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactMultiChild'>; +} +declare module 'react-test-renderer/lib/shallow/ReactMultiChildUpdateTypes.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactMultiChildUpdateTypes'>; +} +declare module 'react-test-renderer/lib/shallow/ReactNodeTypes.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactNodeTypes'>; +} +declare module 'react-test-renderer/lib/shallow/ReactOwner.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactOwner'>; +} +declare module 'react-test-renderer/lib/shallow/ReactPerf.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactPerf'>; +} +declare module 'react-test-renderer/lib/shallow/ReactPriorityLevel.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactPriorityLevel'>; +} +declare module 'react-test-renderer/lib/shallow/reactProdInvariant.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/reactProdInvariant'>; +} +declare module 'react-test-renderer/lib/shallow/ReactPropTypeLocationNames.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactPropTypeLocationNames'>; +} +declare module 'react-test-renderer/lib/shallow/ReactPropTypeLocations.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactPropTypeLocations'>; +} +declare module 'react-test-renderer/lib/shallow/ReactPropTypesSecret.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactPropTypesSecret'>; +} +declare module 'react-test-renderer/lib/shallow/ReactReconciler.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactReconciler'>; +} +declare module 'react-test-renderer/lib/shallow/ReactReconcileTransaction.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactReconcileTransaction'>; +} +declare module 'react-test-renderer/lib/shallow/ReactRef.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactRef'>; +} +declare module 'react-test-renderer/lib/shallow/ReactReifiedYield.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactReifiedYield'>; +} +declare module 'react-test-renderer/lib/shallow/ReactServerBatchingStrategy.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactServerBatchingStrategy'>; +} +declare module 'react-test-renderer/lib/shallow/ReactServerRendering.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactServerRendering'>; +} +declare module 'react-test-renderer/lib/shallow/ReactServerRenderingTransaction.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactServerRenderingTransaction'>; +} +declare module 'react-test-renderer/lib/shallow/ReactServerUpdateQueue.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactServerUpdateQueue'>; +} +declare module 'react-test-renderer/lib/shallow/ReactShallowRenderer.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactShallowRenderer'>; +} +declare module 'react-test-renderer/lib/shallow/ReactSimpleEmptyComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactSimpleEmptyComponent'>; +} +declare module 'react-test-renderer/lib/shallow/ReactSyntheticEventType.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactSyntheticEventType'>; +} +declare module 'react-test-renderer/lib/shallow/ReactTestEmptyComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactTestEmptyComponent'>; +} +declare module 'react-test-renderer/lib/shallow/ReactTestMount.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactTestMount'>; +} +declare module 'react-test-renderer/lib/shallow/ReactTestReconcileTransaction.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactTestReconcileTransaction'>; +} +declare module 'react-test-renderer/lib/shallow/ReactTestRenderer.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactTestRenderer'>; +} +declare module 'react-test-renderer/lib/shallow/ReactTestTextComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactTestTextComponent'>; +} +declare module 'react-test-renderer/lib/shallow/ReactTypeOfWork.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactTypeOfWork'>; +} +declare module 'react-test-renderer/lib/shallow/ReactTypes.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactTypes'>; +} +declare module 'react-test-renderer/lib/shallow/ReactUpdateQueue.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactUpdateQueue'>; +} +declare module 'react-test-renderer/lib/shallow/ReactUpdates.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactUpdates'>; +} +declare module 'react-test-renderer/lib/shallow/ReactVersion.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ReactVersion'>; +} +declare module 'react-test-renderer/lib/shallow/renderSubtreeIntoContainer.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/renderSubtreeIntoContainer'>; +} +declare module 'react-test-renderer/lib/shallow/ResponderEventPlugin.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ResponderEventPlugin'>; +} +declare module 'react-test-renderer/lib/shallow/ResponderSyntheticEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ResponderSyntheticEvent'>; +} +declare module 'react-test-renderer/lib/shallow/ResponderTouchHistoryStore.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ResponderTouchHistoryStore'>; +} +declare module 'react-test-renderer/lib/shallow/SelectEventPlugin.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SelectEventPlugin'>; +} +declare module 'react-test-renderer/lib/shallow/setInnerHTML.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/setInnerHTML'>; +} +declare module 'react-test-renderer/lib/shallow/setTextContent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/setTextContent'>; +} +declare module 'react-test-renderer/lib/shallow/shouldUpdateReactComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/shouldUpdateReactComponent'>; +} +declare module 'react-test-renderer/lib/shallow/SimpleEventPlugin.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SimpleEventPlugin'>; +} +declare module 'react-test-renderer/lib/shallow/SVGDOMPropertyConfig.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SVGDOMPropertyConfig'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticAnimationEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticAnimationEvent'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticClipboardEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticClipboardEvent'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticCompositionEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticCompositionEvent'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticDragEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticDragEvent'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticEvent'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticFocusEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticFocusEvent'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticInputEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticInputEvent'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticKeyboardEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticKeyboardEvent'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticMouseEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticMouseEvent'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticTouchEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticTouchEvent'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticTransitionEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticTransitionEvent'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticUIEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticUIEvent'>; +} +declare module 'react-test-renderer/lib/shallow/SyntheticWheelEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/SyntheticWheelEvent'>; +} +declare module 'react-test-renderer/lib/shallow/TapEventPlugin.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/TapEventPlugin'>; +} +declare module 'react-test-renderer/lib/shallow/TouchHistoryMath.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/TouchHistoryMath'>; +} +declare module 'react-test-renderer/lib/shallow/Transaction.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/Transaction'>; +} +declare module 'react-test-renderer/lib/shallow/traverseAllChildren.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/traverseAllChildren'>; +} +declare module 'react-test-renderer/lib/shallow/validateDOMNesting.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/validateDOMNesting'>; +} +declare module 'react-test-renderer/lib/shallow/ViewportMetrics.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shallow/ViewportMetrics'>; +} +declare module 'react-test-renderer/lib/shouldUpdateReactComponent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/shouldUpdateReactComponent'>; +} +declare module 'react-test-renderer/lib/SyntheticEvent.js' { + declare module.exports: $Exports<'react-test-renderer/lib/SyntheticEvent'>; +} +declare module 'react-test-renderer/lib/TouchHistoryMath.js' { + declare module.exports: $Exports<'react-test-renderer/lib/TouchHistoryMath'>; +} +declare module 'react-test-renderer/lib/Transaction.js' { + declare module.exports: $Exports<'react-test-renderer/lib/Transaction'>; +} +declare module 'react-test-renderer/lib/traverseAllChildren.js' { + declare module.exports: $Exports<'react-test-renderer/lib/traverseAllChildren'>; +} +declare module 'react-test-renderer/shallow.js' { + declare module.exports: $Exports<'react-test-renderer/shallow'>; +} From 9436d03fe8fface09001a5a40ce0aa8a01ad9e7e Mon Sep 17 00:00:00 2001 From: Adam Miskiewicz Date: Mon, 3 Jul 2017 15:06:08 -0700 Subject: [PATCH 06/24] Update to RN 0.45, fix/improve flow coverage --- .flowconfig | 2 +- flow-typed/react-native.js | 191 +++++++++++++----- package.json | 30 +-- ...tformHelpers.js => PlatformHelpers.web.js} | 0 src/TypeDefinition.js | 66 +++--- src/createNavigationContainer.js | 2 +- src/react-navigation.js | 6 +- src/routers/__tests__/StackRouter-test.js | 2 - src/views/CardStack.js | 8 +- src/views/CardStackTransitioner.js | 8 +- src/views/Drawer/DrawerNavigatorItems.js | 7 +- src/views/Drawer/DrawerSidebar.js | 4 +- src/views/Drawer/DrawerView.js | 4 +- src/views/{ => Header}/Header.js | 16 +- src/views/{ => Header}/HeaderBackButton.js | 22 +- .../{ => Header}/HeaderStyleInterpolator.js | 24 ++- src/views/{ => Header}/HeaderTitle.js | 16 +- src/views/TabView/TabBarBottom.js | 20 +- src/views/TabView/TabBarIcon.js | 4 +- src/views/TabView/TabBarTop.js | 9 +- src/views/TouchableItem.js | 16 +- src/views/Transitioner.js | 4 +- stubs/RelativeImageStub.js.flow | 43 ++++ yarn.lock | 150 +++++++------- 24 files changed, 402 insertions(+), 252 deletions(-) rename src/{PlatformHelpers.js => PlatformHelpers.web.js} (100%) rename src/views/{ => Header}/Header.js (95%) rename src/views/{ => Header}/HeaderBackButton.js (84%) rename src/views/{ => Header}/HeaderStyleInterpolator.js (74%) rename src/views/{ => Header}/HeaderTitle.js (61%) create mode 100644 stubs/RelativeImageStub.js.flow diff --git a/.flowconfig b/.flowconfig index ddac272..461dd57 100644 --- a/.flowconfig +++ b/.flowconfig @@ -41,7 +41,7 @@ experimental.strict_type_args=true munge_underscores=true -module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' +module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/stubs/RelativeImageStub.js.flow' module.file_ext=.js module.file_ext=.jsx module.file_ext=.json diff --git a/flow-typed/react-native.js b/flow-typed/react-native.js index 06d8585..d1b5881 100644 --- a/flow-typed/react-native.js +++ b/flow-typed/react-native.js @@ -5,18 +5,18 @@ declare module 'react-native' { declare type Color = string | number; declare type Transform = - { perspective: number } | - { scale: number } | - { scaleX: number } | - { scaleY: number } | - { translateX: number } | - { translateY: number } | - { rotate: string } | - { rotateX: string } | - { rotateY: string } | - { rotateZ: string } | - { skewX: string } | - { skewY: string }; + { perspective: number | AnimatedInterpolation | AnimatedValue } | + { scale: number | AnimatedInterpolation | AnimatedValue } | + { scaleX: number | AnimatedInterpolation | AnimatedValue } | + { scaleY: number | AnimatedInterpolation | AnimatedValue } | + { translateX: number | AnimatedInterpolation | AnimatedValue } | + { translateY: number | AnimatedInterpolation | AnimatedValue } | + { rotate: string | AnimatedInterpolation | AnimatedValue } | + { rotateX: string | AnimatedInterpolation | AnimatedValue } | + { rotateY: string | AnimatedInterpolation | AnimatedValue } | + { rotateZ: string | AnimatedInterpolation | AnimatedValue } | + { skewX: string | AnimatedInterpolation | AnimatedValue } | + { skewY: string | AnimatedInterpolation | AnimatedValue }; declare type TransformPropTypes = {| transform?: Array @@ -580,7 +580,7 @@ declare module 'react-native' { declare type StylePropTypes = {| ...LayoutPropTypes, ...ShadowPropTypes, - ...TransformPropTypes, + ...$Exact, ...ExtraImageStylePropTypes, ...ExtraTextStylePropTypes, ...ExtraViewStylePropTypes, @@ -588,8 +588,8 @@ declare module 'react-native' { declare type StyleId = number; - declare type Styles = {[key: string]: StylePropTypes}; - declare type StyleRuleSet = {[key: $Keys]: StyleId}; + declare export type StyleDefinition = {[key: string]: StylePropTypes}; + declare type StyleRuleSet = {[key: $Keys]: StyleId}; declare type StyleProp = false | null | void | T | V | Array>; declare export var StyleSheet: {| @@ -597,7 +597,7 @@ declare module 'react-native' { absoluteFill: StyleId, absoluteFillObject: Object, flatten: (style: StyleProp) => StylePropTypes, - create(styles: S): StyleRuleSet, + create(styles: S): StyleRuleSet, setStyleAttributePreprocessor(property: string, process: (nextProp: mixed) => mixed): void, |}; @@ -671,8 +671,8 @@ declare module 'react-native' { declare type ViewDefaultProps = { }; - - declare type ViewProps = { + + declare type RCTViewAttributes = { accessible?: boolean, accessibilityLabel?: React$PropType$Primitive, accessibilityComponentType?: AccessibilityComponentType, @@ -684,6 +684,23 @@ declare module 'react-native' { onMagicTap?: Function, testID?: string, nativeID?: string, + pointerEvents?: 'box-none'| 'none'| 'box-only'| 'auto', + removeClippedSubviews?: boolean, + renderToHardwareTextureAndroid?: boolean, + shouldRasterizeIOS?: boolean, + collapsable?: boolean, + needsOffscreenAlphaCompositing?: boolean, + hitSlop?: EdgeInsetsProp, + /** + * Invoked on mount and layout changes with + * + * `{nativeEvent: {layout: {x, y, width, height}}}` + */ + onLayout?: Function, + } + + declare export type ViewProps = { + ...$Exact, onResponderGrant?: Function, onResponderMove?: Function, onResponderReject?: Function, @@ -694,18 +711,11 @@ declare module 'react-native' { onStartShouldSetResponderCapture?: Function, onMoveShouldSetResponder?: Function, onMoveShouldSetResponderCapture?: Function, - hitSlop?: EdgeInsetsProp, - pointerEvents?: 'box-none'| 'none'| 'box-only'| 'auto', - style?: StyleProp, - removeClippedSubviews?: boolean, - renderToHardwareTextureAndroid?: boolean, - shouldRasterizeIOS?: boolean, - collapsable?: boolean, - needsOffscreenAlphaCompositing?: boolean, + style?: StyleProp, children?: React$Element<*>, }; - declare export class View extends React$Component { + declare class BaseView extends React$Component { blur(): void, focus(): void, measure(callback: MeasureOnSuccessCallback): void, @@ -715,8 +725,22 @@ declare module 'react-native' { onSuccess: MeasureLayoutOnSuccessCallback, onFail: () => void, ): void, - setNativeProps(nativeProps: ViewProps): void, + setNativeProps(nativeProps: P): void, } + + declare export class View extends BaseView {} + + declare export type AnimatedViewStylePropTypes = { + ...$Exact, + ...({ [key: $Keys]: AnimatedValue | AnimatedInterpolation }) + }; + + declare type AnimatedViewProps = { + ...$Exact, + style: StyleProp, + } + + declare class AnimatedView extends BaseView {} declare type TextDefaultProps = { accessible: true, @@ -725,7 +749,8 @@ declare module 'react-native' { disabled: false, }; - declare type TextProps = { + declare export type TextProps = { + ...$Exact, /** * When `numberOfLines` is set, this prop defines how text will be truncated. * `numberOfLines` must be set in conjunction with this prop. @@ -759,12 +784,6 @@ declare module 'react-native' { * @platform android */ textBreakStrategy?: 'simple' | 'highQuality' | 'balanced', - /** - * Invoked on mount and layout changes with - * - * `{nativeEvent: {layout: {x, y, width, height}}}` - */ - onLayout?: Function, /** * This function is called on press. * @@ -842,7 +861,7 @@ declare module 'react-native' { children?: React$Element<*>, }; - declare export class Text extends React$Component { + declare class BaseText extends React$Component { blur(): void, focus(): void, measure(callback: MeasureOnSuccessCallback): void, @@ -852,8 +871,22 @@ declare module 'react-native' { onSuccess: MeasureLayoutOnSuccessCallback, onFail: () => void, ): void, - setNativeProps(nativeProps: TextProps): void, + setNativeProps(nativeProps: P): void, } + + declare export class Text extends BaseText {} + + declare type AnimatedTextStylePropTypes = { + ...$Exact, + ...({ [key: $Keys]: AnimatedValue | AnimatedInterpolation }) + }; + + declare type AnimatedTextProps = { + ...$Exact, + style: StyleProp, + }; + + declare class AnimatedText extends BaseText {} declare type ImageUriSourcePropType = { uri: string, @@ -1056,7 +1089,7 @@ declare module 'react-native' { scale: number, }; - declare export class Image extends React$Component { + declare class BaseImage extends React$Component { static resizeMode: ImageResizeModeEnum, /** * Retrieve the width and height (in pixels) of an image prior to displaying it. @@ -1113,12 +1146,26 @@ declare module 'react-native' { onSuccess: MeasureLayoutOnSuccessCallback, onFail: () => void, ): void, - setNativeProps(nativeProps: ImageProps): void, + setNativeProps(nativeProps: P): void, } + + declare export class Image extends BaseImage {} + + declare type AnimatedImageStylePropTypes = { + ...$Exact, + ...({ [key: $Keys]: AnimatedValue | AnimatedInterpolation }) + }; + + declare type AnimatedImageProps = { + ...$Exact, + style: StyleProp, + }; + + declare class AnimatedImage extends BaseView {} declare type ScrollViewProps = { - ...ViewProps, + ...$Exact, /** * Controls whether iOS should automatically adjust the content inset * for scroll views that are placed behind a navigation bar or @@ -1417,9 +1464,9 @@ declare module 'react-native' { overScrollMode?: 'auto' | 'always' | 'never', } - declare export class ScrollView extends React$Component { + declare export class BaseScrollView extends React$Component { // TODO(lmr): ScrollResponder.Mixin? - setNativeProps(props: ScrollViewProps): void, + setNativeProps(props: P): void, /** * Returns a reference to the underlying scroll responder, which supports @@ -1462,7 +1509,21 @@ declare module 'react-native' { options?: { animated?: boolean }, ): void, } - + + declare export class ScrollView extends BaseScrollView {} + + declare type AnimatedScrollViewStyleProps = { + ...$Exact, + ...({ [key: $Keys]: AnimatedValue | AnimatedInterpolation }) + }; + + declare type AnimatedScrollViewProps = { + ...$Exact, + style: StyleProp, + }; + + declare class AnimatedScrollView extends BaseView {} + declare export var Platform: {| OS: 'ios' | 'android', Version: number, @@ -2011,7 +2072,7 @@ declare module 'react-native' { * see [Issue#7070](https://github.com/facebook/react-native/issues/7070) * for more detail. * - * [Styles](docs/style.html) + * [StyleDefinition](docs/style.html) */ style?: StyleProp, /** @@ -2490,7 +2551,8 @@ declare module 'react-native' { setDeadline(deadline: number): void, |}; - declare type EasingFunction = (t: number) => number; + declare type EasingFunction = (t?: number) => number; + declare type EasingFunctionGenerator = (s: number) => EasingFunction; declare export var Easing: {| step0: (n: number) => EasingFunction, @@ -2506,7 +2568,7 @@ declare module 'react-native' { * n = 4: http://easings.net/#easeInQuart * n = 5: http://easings.net/#easeInQuint */ - poly: EasingFunction, + poly: EasingFunctionGenerator, /** * A sinusoidal function. @@ -2595,10 +2657,6 @@ declare module 'react-native' { inOut(easing: EasingFunction): EasingFunction, |}; - - - - declare type ExtrapolateType = 'extend' | 'identity' | 'clamp'; declare type InterpolationConfigType = { inputRange: Array, @@ -2681,6 +2739,12 @@ declare module 'react-native' { declare type ValueListenerCallback = (state: {value: number}) => void; declare class AnimatedValue extends AnimatedWithChildren { + __isNative: boolean, + __getValue: () => number, + __getAnimatedValue: () => number, + + _listeners: { [key: string]: mixed }, + constructor(value: number): void, /** * Directly set the value. This will stop any animations running on the value @@ -2883,7 +2947,7 @@ declare module 'react-native' { } - declare var Animated: {| + declare export var Animated: {| /** * Standard value class for driving animations. Typically initialized with * `new Animated.Value(0);` @@ -3049,6 +3113,11 @@ declare module 'react-native' { */ forkEvent(event: ?AnimatedEvent | ?Function, listener: Function): AnimatedEvent | Function, unforkEvent(event: ?AnimatedEvent | ?Function, listener: Function): void , + + Text: Class, + View: Class, + Image: Class, + ScrollView: Class, |}; declare export function findNodeHandle(componentOrHandle: any): ?number; @@ -3135,7 +3204,12 @@ declare module 'react-native' { tvParallaxProperties?: Object, }; - declare export class TouchableOpacity extends React$Component { + declare type TouchableOpacityDefaultProps = { + activeOpacity: number, + focusedOpacity: number, + }; + + declare export class TouchableOpacity extends React$Component { static defaultProps: { activeOpacity: 0.2, focusedOpacity: 0.7, @@ -3220,8 +3294,8 @@ declare module 'react-native' { */ background: { type: 'RippleAndroid', - color?: number, - borderless?: boolean, + color: number, + borderless: boolean, } | { type: 'ThemeAttrAndroid', attribute: string, @@ -3238,8 +3312,13 @@ declare module 'react-native' { */ useForeground?: boolean, }; + + declare type TouchableNativeFeedbackDefaultProps = { + activeOpacity: number, + underlayColor: string, + }; - declare export class TouchableNativeFeedback extends React$Component { + declare export class TouchableNativeFeedback extends React$Component { static defaultProps: { activeOpacity: 0.85, underlayColor: 'black', @@ -4318,7 +4397,7 @@ declare module 'react-native' { // declare export var Image: any; // declare export var Dimensions: any; // declare export var ScrollView: any; - // declare export var Animated: any; // yes // TODO(lmr): View/Text/Image/ScrollView + // declare export var Animated: any; // yes // declare export var Alert: any; // yes // declare export var TouchableHighlight: any; // declare export var ActivityIndicator: any; diff --git a/package.json b/package.json index 4adb6e7..2babd59 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,18 @@ "lib-rn", "src" ], + "peerDependencies": { + "react": "*", + "react-native": "*" + }, + "dependencies": { + "clamp": "^1.0.1", + "hoist-non-react-statics": "^1.2.0", + "path-to-regexp": "^1.7.0", + "prop-types": "^15.5.10", + "react-native-drawer-layout-polyfill": "^1.3.1", + "react-native-tab-view": "^0.0.66" + }, "devDependencies": { "babel-cli": "^6.24.1", "babel-core": "^6.24.1", @@ -61,27 +73,15 @@ "eslint-plugin-jsx-a11y": "^5.0.1", "eslint-plugin-prettier": "^2.0.1", "eslint-plugin-react": "^7.0.1", - "flow-bin": "0.42.0", + "flow-bin": "^0.49.1", "jest": "^20.0.1", "prettier": "^1.3.1", "prettier-eslint": "^6.2.2", - "react": "16.0.0-alpha.6", - "react-native": "^0.44.0", + "react": "16.0.0-alpha.12", + "react-native": "^0.45.1", "react-native-vector-icons": "^4.1.1", "react-test-renderer": "^15.4.2" }, - "peerDependencies": { - "react": "*", - "react-native": "*" - }, - "dependencies": { - "clamp": "^1.0.1", - "hoist-non-react-statics": "^1.2.0", - "path-to-regexp": "^1.7.0", - "prop-types": "^15.5.10", - "react-native-drawer-layout-polyfill": "^1.3.1", - "react-native-tab-view": "^0.0.66" - }, "jest": { "notify": true, "preset": "react-native", diff --git a/src/PlatformHelpers.js b/src/PlatformHelpers.web.js similarity index 100% rename from src/PlatformHelpers.js rename to src/PlatformHelpers.web.js diff --git a/src/TypeDefinition.js b/src/TypeDefinition.js index 8c81a4c..5759d40 100644 --- a/src/TypeDefinition.js +++ b/src/TypeDefinition.js @@ -2,13 +2,29 @@ import React from 'react'; -// @todo when we split types into common, native and web, -// we can properly change Animated.Value to its real value -type AnimatedValue = *; +import { + Animated, + type ViewProps, + type TextProps, + type StyleDefinition, + type AnimatedViewStylePropTypes, +} from 'react-native'; + +export type ViewStyleProp = $PropertyType; +export type TextStyleProp = $PropertyType; +export type AnimatedViewStyleProp = $PropertyType< + $PropertyType, + 'style' +>; +export type AnimatedTextStyleProp = $PropertyType< + $PropertyType, + 'style' +>; export type HeaderMode = 'float' | 'screen' | 'none'; -export type HeaderProps = NavigationSceneRendererProps & { +export type HeaderProps = { + ...$Exact, mode: HeaderMode, router: NavigationRouter< NavigationState, @@ -18,7 +34,7 @@ export type HeaderProps = NavigationSceneRendererProps & { getScreenDetails: NavigationScene => NavigationScreenDetails< NavigationStackScreenOptions >, - style: Style, + style: ViewStyleProp, }; /** @@ -66,7 +82,8 @@ export type NavigationLeafRoute = { params?: NavigationParams, }; -export type NavigationStateRoute = NavigationLeafRoute & { +export type NavigationStateRoute = { + ...$Exact, index: number, routes: Array, }; @@ -122,14 +139,6 @@ export type NavigationScreenOption = config: T ) => T); -export type Style = - | { [key: string]: any } - | number - | false - | null - | void - | Array