Update FlowFixMes to use error codes in react-native-github

Summary:
Changelog:
[Internal] - Add error codes to existing FlowFixMe's

Reviewed By: kacieb

Differential Revision: D27445689

fbshipit-source-id: 2b19692e1cb822ab6785efcc5f93ee33e7dce1e5
This commit is contained in:
Luna Wei 2021-03-31 18:19:54 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 321de15803
Коммит bac2c2c801
65 изменённых файлов: 370 добавлений и 281 удалений

Просмотреть файл

@ -218,9 +218,10 @@ class AsyncStorageTest extends React.Component<{...}, $FlowFixMeState> {
return (
<View style={styles.container}>
<Text>
{/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error found when Flow v0.54 was deployed.
* To see the error delete this comment and run Flow. */
{/* $FlowFixMe[incompatible-type] (>=0.54.0 site=react_native_fb,react_
* native_oss) This comment suppresses an error found when Flow v0.54
* was deployed. To see the error delete this comment and run Flow.
*/
this.constructor.displayName + ': '}
{this.state.done ? 'Done' : 'Testing...'}
{'\n\n' + this.state.messages}

Просмотреть файл

@ -56,9 +56,10 @@ class IntegrationTestHarnessTest extends React.Component<Props, State> {
return (
<View style={styles.container}>
<Text>
{/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error found when Flow v0.54 was deployed.
* To see the error delete this comment and run Flow. */
{/* $FlowFixMe[incompatible-type] (>=0.54.0 site=react_native_fb,react_
* native_oss) This comment suppresses an error found when Flow v0.54
* was deployed. To see the error delete this comment and run Flow.
*/
this.constructor.displayName + ': '}
{this.state.done ? 'Done' : 'Testing...'}
</Text>

Просмотреть файл

@ -40,9 +40,9 @@ const TESTS = [
];
TESTS.forEach(
/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error found when Flow v0.54 was deployed. To see the error
* delete this comment and run Flow. */
/* $FlowFixMe[incompatible-call] (>=0.54.0 site=react_native_fb,react_native_
* oss) This comment suppresses an error found when Flow v0.54 was deployed.
* To see the error delete this comment and run Flow. */
test => AppRegistry.registerComponent(test.displayName, () => test),
);
@ -60,9 +60,10 @@ class IntegrationTestsApp extends React.Component<{...}, $FlowFixMeState> {
if (this.state.test) {
return (
<ScrollView>
{/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */}
{/* $FlowFixMe[type-as-value] (>=0.53.0 site=react_native_fb,react_
* native_oss) This comment suppresses an error when upgrading
* Flow's support for React. To see the error delete this comment
* and run Flow. */}
<this.state.test />
</ScrollView>
);
@ -79,9 +80,10 @@ class IntegrationTestsApp extends React.Component<{...}, $FlowFixMeState> {
{TESTS.map(test => [
<TouchableOpacity
onPress={() => this.setState({test})}
/* $FlowFixMe(>=0.115.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.115 was deployed. To
* see the error, delete this comment and run Flow. */
/* $FlowFixMe[incompatible-type] (>=0.115.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.115 was
* deployed. To see the error, delete this comment and run Flow.
*/
style={styles.row}>
<Text style={styles.testName}>{test.displayName}</Text>
</TouchableOpacity>,

Просмотреть файл

@ -211,9 +211,9 @@ class AnimatedEvent {
}
} else if (typeof recMapping === 'object') {
for (const mappingKey in recMapping) {
/* $FlowFixMe(>=0.120.0) This comment suppresses an error found
* when Flow v0.120 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.120.0) This comment suppresses an
* error found when Flow v0.120 was deployed. To see the error,
* delete this comment and run Flow. */
traverse(recMapping[mappingKey], recEvt[mappingKey], mappingKey);
}
}

Просмотреть файл

@ -14,10 +14,13 @@ const AnimatedImplementation = require('./AnimatedImplementation');
module.exports = {
...AnimatedImplementation,
// $FlowFixMe createAnimatedComponent expects to receive types. Plain intrinsic components can't be typed like this
/* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive
* types. Plain intrinsic components can't be typed like this */
div: (AnimatedImplementation.createAnimatedComponent('div'): $FlowFixMe),
// $FlowFixMe createAnimatedComponent expects to receive types. Plain intrinsic components can't be typed like this
/* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive
* types. Plain intrinsic components can't be typed like this */
span: (AnimatedImplementation.createAnimatedComponent('span'): $FlowFixMe),
// $FlowFixMe createAnimatedComponent expects to receive types. Plain intrinsic components can't be typed like this
/* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive
* types. Plain intrinsic components can't be typed like this */
img: (AnimatedImplementation.createAnimatedComponent('img'): $FlowFixMe),
};

Просмотреть файл

@ -393,7 +393,8 @@ module.exports = {
assertNativeAnimatedModule,
shouldUseNativeDriver,
transformDataType,
// $FlowExpectedError - unsafe getter lint suppresion
// $FlowExpectedError[unsafe-getters-setters] - unsafe getter lint suppresion
// $FlowExpectedError[missing-type-arg] - unsafe getter lint suppresion
get nativeEventEmitter(): NativeEventEmitter {
if (!nativeEventEmitter) {
nativeEventEmitter = new NativeEventEmitter(NativeAnimatedModule);

Просмотреть файл

@ -205,14 +205,12 @@ function createInterpolationFromStringOutputRange(
// [200, 250],
// [0, 0.5],
// ]
/* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need to
* guard against this possibility.
*/
/* $FlowFixMe[incompatible-use] (>=0.18.0): `outputRange[0].match()` can
* return `null`. Need to guard against this possibility. */
const outputRanges = outputRange[0].match(stringShapeRegex).map(() => []);
outputRange.forEach(value => {
/* $FlowFixMe(>=0.18.0): `value.match()` can return `null`. Need to guard
* against this possibility.
*/
/* $FlowFixMe[incompatible-use] (>=0.18.0): `value.match()` can return
* `null`. Need to guard against this possibility. */
value.match(stringShapeRegex).forEach((number, i) => {
outputRanges[i].push(+number);
});
@ -220,8 +218,10 @@ function createInterpolationFromStringOutputRange(
const interpolations = outputRange[0]
.match(stringShapeRegex)
/* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need
* to guard against this possibility. */
/* $FlowFixMe[incompatible-use] (>=0.18.0): `outputRange[0].match()` can
* return `null`. Need to guard against this possibility. */
/* $FlowFixMe[incompatible-call] (>=0.18.0): `outputRange[0].match()` can
* return `null`. Need to guard against this possibility. */
.map((value, i) => {
return createInterpolation({
...config,
@ -277,12 +277,11 @@ function checkValidInputRange(arr: $ReadOnlyArray<number>) {
for (let i = 1; i < arr.length; ++i) {
invariant(
arr[i] >= arr[i - 1],
/* $FlowFixMe(>=0.13.0) - In the addition expression below this comment,
* one or both of the operands may be something that doesn't cleanly
* convert to a string, like undefined, null, and object, etc. If you really
* mean this implicit string conversion, you can do something like
* String(myThing)
*/
/* $FlowFixMe[incompatible-type] (>=0.13.0) - In the addition expression
* below this comment, one or both of the operands may be something that
* doesn't cleanly convert to a string, like undefined, null, and object,
* etc. If you really mean this implicit string conversion, you can do
* something like String(myThing) */
'inputRange must be monotonically non-decreasing ' + arr,
);
}
@ -292,12 +291,11 @@ function checkInfiniteRange(name: string, arr: $ReadOnlyArray<number>) {
invariant(arr.length >= 2, name + ' must have at least 2 elements');
invariant(
arr.length !== 2 || arr[0] !== -Infinity || arr[1] !== Infinity,
/* $FlowFixMe(>=0.13.0) - In the addition expression below this comment,
* one or both of the operands may be something that doesn't cleanly convert
* to a string, like undefined, null, and object, etc. If you really mean
* this implicit string conversion, you can do something like
* String(myThing)
*/
/* $FlowFixMe[incompatible-type] (>=0.13.0) - In the addition expression
* below this comment, one or both of the operands may be something that
* doesn't cleanly convert to a string, like undefined, null, and object,
* etc. If you really mean this implicit string conversion, you can do
* something like String(myThing) */
name + 'cannot be ]-infinity;+infinity[ ' + arr,
);
}
@ -358,8 +356,9 @@ class AnimatedInterpolation extends AnimatedWithChildren {
return {
inputRange: this._config.inputRange,
// Only the `outputRange` can contain strings so we don't need to transform `inputRange` here
/* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment of
* v0.38.0. To see the error, remove this comment and run flow */
/* $FlowFixMe[incompatible-call] (>=0.38.0) - Flow error detected during
* the deployment of v0.38.0. To see the error, remove this comment and
* run flow */
outputRange: this.__transformDataType(this._config.outputRange),
extrapolateLeft:
this._config.extrapolateLeft || this._config.extrapolate || 'extend',

Просмотреть файл

@ -46,9 +46,9 @@ const NativeAnimatedAPI = NativeAnimatedHelper.API;
function _flush(rootNode: AnimatedValue): void {
const animatedStyles = new Set();
function findAnimatedStyles(node) {
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.68 was deployed. To see the error delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.68.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.68 was deployed. To see the error
* delete this comment and run Flow. */
if (typeof node.update === 'function') {
animatedStyles.add(node);
} else {
@ -56,7 +56,7 @@ function _flush(rootNode: AnimatedValue): void {
}
}
findAnimatedStyles(rootNode);
/* $FlowFixMe */
// $FlowFixMe[prop-missing]
animatedStyles.forEach(animatedStyle => animatedStyle.update());
}

Просмотреть файл

@ -376,7 +376,7 @@ class MessageQueue {
// can be configured by the VM or any Inspector
__shouldPauseOnThrow(): boolean {
return (
// $FlowFixMe
// $FlowFixMe[cannot-resolve-name]
typeof DebuggerInternal !== 'undefined' &&
DebuggerInternal.shouldPauseOnThrow === true // eslint-disable-line no-undef
);

Просмотреть файл

@ -162,7 +162,7 @@ function copyWithSetImpl(obj, path, idx, value) {
}
const key = path[idx];
const updated = Array.isArray(obj) ? obj.slice() : {...obj};
// $FlowFixMe number or string is fine here
// $FlowFixMe[incompatible-use] number or string is fine here
updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);
return updated;
}

Просмотреть файл

@ -233,7 +233,7 @@ const AccessibilityInfo = {
return {
remove: () => {
// $FlowIssue flow does not recognize handler properly
// $FlowIssue[incompatible-call] flow does not recognize handler properly
AccessibilityInfo.removeEventListener<K>(eventName, handler);
},
};

Просмотреть файл

@ -111,10 +111,10 @@ const ActivityIndicator = (
onLayout={onLayout}
style={StyleSheet.compose(styles.container, style)}>
{Platform.OS === 'android' ? (
// $FlowFixMe Flow doesn't know when this is the android component
// $FlowFixMe[prop-missing] Flow doesn't know when this is the android component
<PlatformActivityIndicator {...nativeProps} {...androidProps} />
) : (
/* $FlowFixMe(>=0.106.0 site=react_native_android_fb) This comment
/* $FlowFixMe[prop-missing] (>=0.106.0 site=react_native_android_fb) This comment
* suppresses an error found when Flow v0.106 was deployed. To see the
* error, delete this comment and run Flow. */
<PlatformActivityIndicator {...nativeProps} />

Просмотреть файл

@ -12,9 +12,9 @@
'use strict';
const React = require('react');
/* $FlowFixMe(>=0.99.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.99 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[cannot-resolve-module] (>=0.99.0 site=react_native_ios_fb) This
* comment suppresses an error found when Flow v0.99 was deployed. To see the
* error, delete this comment and run Flow. */
const DrawerLayoutAndroid = require('../DrawerLayoutAndroid.android');
const View = require('../../View/View');

Просмотреть файл

@ -147,13 +147,17 @@ class Picker extends React.Component<PickerProps> {
render(): React.Node {
if (Platform.OS === 'ios') {
/* $FlowFixMe(>=0.81.0 site=react_native_ios_fb) This suppression was
* added when renaming suppression sites. */
/* $FlowFixMe[prop-missing] (>=0.81.0 site=react_native_ios_fb) This
* suppression was added when renaming suppression sites. */
/* $FlowFixMe[incompatible-type] (>=0.81.0 site=react_native_ios_fb) This
* suppression was added when renaming suppression sites. */
return <PickerIOS {...this.props}>{this.props.children}</PickerIOS>;
} else if (Platform.OS === 'android') {
return (
/* $FlowFixMe(>=0.81.0 site=react_native_android_fb) This suppression
* was added when renaming suppression sites. */
/* $FlowFixMe[incompatible-type] (>=0.81.0 site=react_native_android_fb) This
* suppression was added when renaming suppression sites. */
/* $FlowFixMe[prop-missing] (>=0.81.0 site=react_native_android_fb) This
* suppression was added when renaming suppression sites. */
<PickerAndroid {...this.props}>{this.props.children}</PickerAndroid>
);
} else {

Просмотреть файл

@ -12,9 +12,9 @@
'use strict';
const React = require('react');
/* $FlowFixMe(>=0.99.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.99 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[cannot-resolve-module] (>=0.99.0 site=react_native_ios_fb) This
* comment suppresses an error found when Flow v0.99 was deployed. To see the
* error, delete this comment and run Flow. */
const ProgressBarAndroid = require('../ProgressBarAndroid.android');
const ReactNativeTestTools = require('../../../Utilities/ReactNativeTestTools');

Просмотреть файл

@ -639,7 +639,8 @@ export type Props = $ReadOnly<{|
*
* See [RefreshControl](docs/refreshcontrol.html).
*/
// $FlowFixMe - how to handle generic type without existential operator?
/* $FlowFixMe[unclear-type] - how to handle generic type without existential
* operator? */
refreshControl?: ?React.Element<any>,
children?: React.Node,
/**
@ -855,7 +856,7 @@ class ScrollView extends React.Component<Props, State> {
* to the underlying scroll responder's methods.
*/
getScrollResponder: () => ScrollResponderType = () => {
// $FlowFixMe
// $FlowFixMe[unclear-type]
return ((this: any): ScrollResponderType);
};
@ -1799,7 +1800,7 @@ function Wrapper(props, ref) {
Wrapper.displayName = 'ScrollView';
const ForwardedScrollView = React.forwardRef(Wrapper);
// $FlowFixMe Add static context to ForwardedScrollView
// $FlowFixMe[prop-missing] Add static context to ForwardedScrollView
ForwardedScrollView.Context = ScrollViewContext;
ForwardedScrollView.displayName = 'ScrollView';

Просмотреть файл

@ -115,7 +115,7 @@ const SegmentedControlIOSWithRef = React.forwardRef(
},
);
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[cannot-resolve-name] (>=0.89.0 site=react_native_ios_fb) This
* comment suppresses an error found when Flow v0.89 was deployed. To see the
* error, delete this comment and run Flow. */
module.exports = (SegmentedControlIOSWithRef: NativeSegmentedControlIOS);

Просмотреть файл

@ -1142,8 +1142,14 @@ function InternalTextInput(props: Props): React.Node {
}
textInput = (
/* $FlowFixMe the types for AndroidTextInput don't match up exactly with
the props for TextInput. This will need to get fixed */
/* $FlowFixMe[prop-missing] the types for AndroidTextInput don't match up
* exactly with the props for TextInput. This will need to get fixed */
/* $FlowFixMe[incompatible-type] the types for AndroidTextInput don't
* match up exactly with the props for TextInput. This will need to get
* fixed */
/* $FlowFixMe[incompatible-type-arg] the types for AndroidTextInput don't
* match up exactly with the props for TextInput. This will need to get
* fixed */
<AndroidTextInput
ref={_setNativeRef}
{...props}
@ -1159,8 +1165,12 @@ function InternalTextInput(props: Props): React.Node {
onBlur={_onBlur}
onChange={_onChange}
onFocus={_onFocus}
/* $FlowFixMe the types for AndroidTextInput don't match up exactly
* with the props for TextInput. This will need to get fixed */
/* $FlowFixMe[prop-missing] the types for AndroidTextInput don't match
* up exactly with the props for TextInput. This will need to get fixed
*/
/* $FlowFixMe[incompatible-type-arg] the types for AndroidTextInput
* don't match up exactly with the props for TextInput. This will need
* to get fixed */
onScroll={_onScroll}
onSelectionChange={_onSelectionChange}
selection={selection}
@ -1203,7 +1213,7 @@ const ExportedForwardRef: React.AbstractComponent<
// TODO: Deprecate this
ExportedForwardRef.propTypes = DeprecatedTextInputPropTypes;
// $FlowFixMe
// $FlowFixMe[prop-missing]
ExportedForwardRef.State = {
currentlyFocusedInput: TextInputState.currentlyFocusedInput,

Просмотреть файл

@ -469,7 +469,7 @@ let ExportedJSTimers: {|
if (!NativeTiming) {
console.warn("Timing native module is not available, can't set timers.");
// $FlowFixMe: we can assume timers are generally available
// $FlowFixMe[prop-missing] : we can assume timers are generally available
ExportedJSTimers = ({
callImmediates: JSTimers.callImmediates,
setImmediate: JSTimers.setImmediate,

Просмотреть файл

@ -173,9 +173,9 @@ Image.displayName = 'Image';
*
* See https://reactnative.dev/docs/image.html#getsize
*/
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
* suppresses an error found when Flow v0.89 was deployed. To see the error,
* delete this comment and run Flow. */
Image.getSize = getSize;
/**
@ -184,9 +184,9 @@ Image.getSize = getSize;
*
* See https://reactnative.dev/docs/image.html#getsizewithheaders
*/
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
* suppresses an error found when Flow v0.89 was deployed. To see the error,
* delete this comment and run Flow. */
Image.getSizeWithHeaders = getSizeWithHeaders;
/**
@ -195,9 +195,9 @@ Image.getSizeWithHeaders = getSizeWithHeaders;
*
* See https://reactnative.dev/docs/image.html#prefetch
*/
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
* suppresses an error found when Flow v0.89 was deployed. To see the error,
* delete this comment and run Flow. */
Image.prefetch = prefetch;
/**
@ -206,9 +206,9 @@ Image.prefetch = prefetch;
*
* See https://reactnative.dev/docs/image.html#prefetch
*/
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
* suppresses an error found when Flow v0.89 was deployed. To see the error,
* delete this comment and run Flow. */
Image.prefetchWithMetadata = prefetchWithMetadata;
/**
@ -216,9 +216,9 @@ Image.prefetchWithMetadata = prefetchWithMetadata;
*
* See https://reactnative.dev/docs/image.html#querycache
*/
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
* suppresses an error found when Flow v0.89 was deployed. To see the error,
* delete this comment and run Flow. */
Image.queryCache = queryCache;
/**
@ -226,9 +226,9 @@ Image.queryCache = queryCache;
*
* See https://reactnative.dev/docs/image.html#resolveassetsource
*/
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
* suppresses an error found when Flow v0.89 was deployed. To see the error,
* delete this comment and run Flow. */
Image.resolveAssetSource = resolveAssetSource;
Image.propTypes = DeprecatedImagePropType;

Просмотреть файл

@ -70,7 +70,7 @@ class ElementProperties extends React.Component<Props> {
<TouchableHighlight
key={'item-' + i}
style={[styles.breadItem, i === selection && styles.selected]}
// $FlowFixMe found when converting React.createClass to ES6
// $FlowFixMe[not-a-function] found when converting React.createClass to ES6
onPress={() => this.props.setSelection(i)}>
<Text style={styles.breadItemText}>{hierarchyItem.name}</Text>
</TouchableHighlight>

Просмотреть файл

@ -69,7 +69,7 @@ class InspectorPanel extends React.Component<Props> {
style={this.props.inspected.style}
frame={this.props.inspected.frame}
source={this.props.inspected.source}
// $FlowFixMe: Hierarchy should be non-nullable
// $FlowFixMe[incompatible-type] : Hierarchy should be non-nullable
hierarchy={this.props.hierarchy}
selection={this.props.selection}
setSelection={this.props.setSelection}

Просмотреть файл

@ -405,9 +405,9 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
);
} else if (this.props.onViewableItemsChanged) {
this._virtualizedListPairs.push({
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete
* this comment and run Flow. */
/* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.63 was deployed. To
* see the error delete this comment and run Flow. */
viewabilityConfig: this.props.viewabilityConfig,
onViewableItemsChanged: this._createOnViewableItemsChanged(
this.props.onViewableItemsChanged,
@ -448,9 +448,9 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
_checkProps(props: Props<ItemT>) {
const {
// $FlowFixMe this prop doesn't exist, is only used for an invariant
// $FlowFixMe[prop-missing] this prop doesn't exist, is only used for an invariant
getItem,
// $FlowFixMe this prop doesn't exist, is only used for an invariant
// $FlowFixMe[prop-missing] this prop doesn't exist, is only used for an invariant
getItemCount,
horizontal,
numColumns,
@ -522,7 +522,7 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
);
}
} else {
// $FlowFixMe Can't call keyExtractor with an array
// $FlowFixMe[incompatible-call] Can't call keyExtractor with an array
return keyExtractor(items, index);
}
};
@ -580,7 +580,9 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
const renderer = (props): React.Node => {
if (ListItemComponent) {
// $FlowFixMe Component isn't valid
// $FlowFixMe[not-a-component] Component isn't valid
// $FlowFixMe[incompatible-type-arg] Component isn't valid
// $FlowFixMe[incompatible-return] Component isn't valid
return <ListItemComponent {...props} />;
} else if (renderItem) {
// $FlowFixMe[incompatible-call]
@ -591,9 +593,9 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
};
return {
/* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.111 was deployed. To see the error, delete
* this comment and run Flow. */
/* $FlowFixMe[invalid-computed-prop] (>=0.111.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.111 was deployed.
* To see the error, delete this comment and run Flow. */
[virtualizedListRenderKey]: (info: RenderItemProps<ItemT>) => {
if (numColumns > 1) {
const {item, index} = info;

Просмотреть файл

@ -89,9 +89,9 @@ class ViewabilityHelper {
* Cleanup, e.g. on unmount. Clears any pending timers.
*/
dispose() {
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
/* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.63 was deployed. To see
* the error delete this comment and run Flow. */
this._timers.forEach(clearTimeout);
}
@ -227,9 +227,9 @@ class ViewabilityHelper {
this._viewableIndices = viewableIndices;
if (this._config.minimumViewTime) {
const handle = setTimeout(() => {
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete
* this comment and run Flow. */
/* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.63 was deployed. To
* see the error delete this comment and run Flow. */
this._timers.delete(handle);
this._onUpdateSync(
viewableIndices,
@ -237,9 +237,9 @@ class ViewabilityHelper {
createViewToken,
);
}, this._config.minimumViewTime);
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
/* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.63 was deployed. To see
* the error delete this comment and run Flow. */
this._timers.add(handle);
} else {
this._onUpdateSync(

Просмотреть файл

@ -681,7 +681,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
constructor(props: Props) {
super(props);
invariant(
// $FlowFixMe
// $FlowFixMe[prop-missing]
!props.onScroll || !props.onScroll.__isNative,
'Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent ' +
'to support native onScroll events with useNativeDriver',
@ -905,7 +905,8 @@ class VirtualizedList extends React.PureComponent<Props, State> {
const element = React.isValidElement(ListHeaderComponent) ? (
ListHeaderComponent
) : (
// $FlowFixMe
// $FlowFixMe[not-a-component]
// $FlowFixMe[incompatible-type-arg]
<ListHeaderComponent />
);
cells.push(
@ -919,7 +920,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
this.props.ListHeaderComponentStyle,
)}>
{
// $FlowFixMe - Typing ReactNativeComponent revealed errors
// $FlowFixMe[incompatible-type] - Typing ReactNativeComponent revealed errors
element
}
</View>
@ -1028,7 +1029,8 @@ class VirtualizedList extends React.PureComponent<Props, State> {
) ? (
ListEmptyComponent
) : (
// $FlowFixMe
// $FlowFixMe[not-a-component]
// $FlowFixMe[incompatible-type-arg]
<ListEmptyComponent />
)): any);
cells.push(
@ -1048,7 +1050,8 @@ class VirtualizedList extends React.PureComponent<Props, State> {
const element = React.isValidElement(ListFooterComponent) ? (
ListFooterComponent
) : (
// $FlowFixMe
// $FlowFixMe[not-a-component]
// $FlowFixMe[incompatible-type-arg]
<ListFooterComponent />
);
cells.push(
@ -1062,7 +1065,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
this.props.ListFooterComponentStyle,
)}>
{
// $FlowFixMe - Typing ReactNativeComponent revealed errors
// $FlowFixMe[incompatible-type] - Typing ReactNativeComponent revealed errors
element
}
</View>
@ -1235,7 +1238,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
_defaultRenderScrollComponent = props => {
const onRefresh = props.onRefresh;
if (this._isNestedWithSameOrientation()) {
// $FlowFixMe - Typing ReactNativeComponent revealed errors
// $FlowFixMe[prop-missing] - Typing ReactNativeComponent revealed errors
return <View {...props} />;
} else if (onRefresh) {
invariant(
@ -1245,7 +1248,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
'`',
);
return (
// $FlowFixMe Invalid prop usage
// $FlowFixMe[prop-missing] Invalid prop usage
<ScrollView
{...props}
refreshControl={
@ -1262,7 +1265,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
/>
);
} else {
// $FlowFixMe Invalid prop usage
// $FlowFixMe[prop-missing] Invalid prop usage
return <ScrollView {...props} />;
}
};
@ -1423,9 +1426,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
const itemCount = this.props.getItemCount(this.props.data);
for (let ii = 0; ii < itemCount; ii++) {
const frame = this._getFrameMetricsApprox(ii);
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.68 was deployed. To see the error delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.68.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.68 was deployed. To see the
* error delete this comment and run Flow. */
if (frame.inLayout) {
framesInLayout.push(frame);
}
@ -1872,9 +1875,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
frame = getItemLayout(data, index);
}
}
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.63 was deployed. To see the error delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.63.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.63 was deployed. To see the error
* delete this comment and run Flow. */
return frame;
};
@ -2001,9 +2004,12 @@ class CellRenderer extends React.Component<
}
if (ListItemComponent) {
/* $FlowFixMe(>=0.108.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.108 was deployed. To see the error, delete
* this comment and run Flow. */
/* $FlowFixMe[not-a-component] (>=0.108.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.108 was deployed. To
* see the error, delete this comment and run Flow. */
/* $FlowFixMe[incompatible-type-arg] (>=0.108.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.108 was deployed.
* To see the error, delete this comment and run Flow. */
return React.createElement(ListItemComponent, {
item,
index,
@ -2045,9 +2051,9 @@ class CellRenderer extends React.Component<
);
const onLayout =
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.68 was deployed. To see the error delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.68.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.68 was deployed. To see the
* error delete this comment and run Flow. */
getItemLayout && !parentProps.debug && !fillRateHelper.enabled()
? undefined
: this.props.onLayout;
@ -2064,9 +2070,9 @@ class CellRenderer extends React.Component<
? [styles.row, inversionStyle]
: inversionStyle;
const result = !CellRendererComponent ? (
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
/* $FlowFixMe[incompatible-type-arg] (>=0.89.0 site=react_native_fb) *
This comment suppresses an error found when Flow v0.89 was deployed. *
To see the error, delete this comment and run Flow. */
<View style={cellStyle} onLayout={onLayout}>
{element}
{itemSeparator}

Просмотреть файл

@ -207,7 +207,7 @@ describe('VirtualizedSectionList', () => {
const viewOffset = 25;
// $FlowFixMe scrollToLocation isn't on instance
// $FlowFixMe[prop-missing] scrollToLocation isn't on instance
instance?.scrollToLocation({
sectionIndex: 0,
itemIndex: 1,

Просмотреть файл

@ -45,9 +45,9 @@ function LogBoxInspectorSourceMapStatus(props: Props): React.Node {
animation,
rotate: animated.interpolate({
inputRange: [0, 1],
/* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment
* of v0.38.0. To see the error, remove this comment and run flow
*/
/* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error
* detected during the deployment of v0.38.0. To see the error,
* remove this comment and run flow */
outputRange: ['0deg', '360deg'],
}),
});

Просмотреть файл

@ -57,8 +57,9 @@ function LogBoxLogNotification(props: Props): React.Node {
function CountBadge(props) {
return (
<View style={countStyles.outside}>
{/* $FlowFixMe(>=0.114.0) This suppression was added when fixing the type
* of `StyleSheet.create`. Remove this comment to see the error. */}
{/* $FlowFixMe[incompatible-type] (>=0.114.0) This suppression was added
* when fixing the type of `StyleSheet.create`. Remove this comment to
* see the error. */}
<View style={[countStyles.inside, countStyles[props.level]]}>
<Text style={countStyles.text}>
{props.count <= 1 ? '!' : props.count}

Просмотреть файл

@ -271,9 +271,9 @@ const styles = StyleSheet.create({
position: 'absolute',
},
container: {
/* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.111 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[invalid-computed-prop] (>=0.111.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.111 was deployed. To see
* the error, delete this comment and run Flow. */
[side]: 0,
top: 0,
flex: 1,

Просмотреть файл

@ -34,7 +34,8 @@ function convertRequestBody(body: RequestBody): Object {
return {formData: body.getParts()};
}
if (body instanceof ArrayBuffer || ArrayBuffer.isView(body)) {
// $FlowFixMe: no way to assert that 'body' is indeed an ArrayBufferView
/* $FlowFixMe[incompatible-call] : no way to assert that 'body' is indeed
* an ArrayBufferView */
return {base64: binaryToBase64(body)};
}
return body;

Просмотреть файл

@ -215,9 +215,10 @@ class PermissionsAndroid {
...rationale,
};
NativeDialogManagerAndroid.showAlert(
/* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.111 was deployed. To see
* the error, delete this comment and run Flow. */
/* $FlowFixMe[incompatible-exact] (>=0.111.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.111 was
* deployed. To see the error, delete this comment and run Flow.
*/
options,
() => reject(new Error('Error showing rationale')),
() =>

Просмотреть файл

@ -256,7 +256,7 @@ describe('Pressability', () => {
beforeEach(() => {
originalPlatform = Platform.OS;
Platform.OS = 'web';
// $FlowExpectedError
// $FlowExpectedError[prop-missing]
HoverState.isHoverEnabled.mockReturnValue(true);
});
@ -276,7 +276,7 @@ describe('Pressability', () => {
typeof handlers.onMouseEnter === 'function',
'Expected to find "onMouseEnter" function',
);
// $FlowExpectedError
// $FlowExpectedError[not-a-function]
handlers.onMouseEnter(createMockMouseEvent('onMouseEnter'));
expect(config.onHoverIn).toBeCalled();
});
@ -289,7 +289,7 @@ describe('Pressability', () => {
typeof handlers.onMouseEnter === 'function',
'Expected to find "onMouseEnter" function',
);
// $FlowExpectedError
// $FlowExpectedError[not-a-function]
handlers.onMouseEnter(createMockMouseEvent('onMouseEnter'));
expect(config.onHoverIn).toBeCalled();
});
@ -302,7 +302,7 @@ describe('Pressability', () => {
typeof handlers.onMouseEnter === 'function',
'Expected to find "onMouseEnter" function',
);
// $FlowExpectedError
// $FlowExpectedError[not-a-function]
handlers.onMouseEnter(createMockMouseEvent('onMouseEnter'));
expect(config.onHoverIn).toBeCalled();
});
@ -315,7 +315,7 @@ describe('Pressability', () => {
typeof handlers.onMouseEnter === 'function',
'Expected to find "onMouseEnter" function',
);
// $FlowExpectedError
// $FlowExpectedError[not-a-function]
handlers.onMouseEnter(createMockMouseEvent('onMouseEnter'));
jest.advanceTimersByTime(499);
expect(config.onHoverIn).not.toBeCalled();
@ -331,7 +331,7 @@ describe('Pressability', () => {
typeof handlers.onMouseEnter === 'function',
'Expected to find "onMouseEnter" function',
);
// $FlowExpectedError
// $FlowExpectedError[not-a-function]
handlers.onMouseEnter(createMockMouseEvent('onMouseEnter'));
expect(config.onHoverIn).toBeCalled();
});

Просмотреть файл

@ -53,7 +53,7 @@ export type Spec = {|
config: LayoutAnimationConfig,
callback: () => void, // check what is returned here
// This error isn't currently called anywhere, so the `error` object is really not defined
// $FlowFixMe
// $FlowFixMe[unclear-type]
errorCallback: (error: Object) => void,
) => void,
+sendAccessibilityEvent: (node: Node, eventType: string) => void,

Просмотреть файл

@ -76,9 +76,9 @@ function getViewManagerConfig(viewManagerName: string): any {
return viewManagerConfigs[viewManagerName];
}
/* $FlowFixMe(>=0.123.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.123.0 was deployed. To see the error, delete this comment
* and run Flow. */
/* $FlowFixMe[cannot-spread-interface] (>=0.123.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.123.0 was deployed. To see
* the error, delete this comment and run Flow. */
const UIManagerJS = {
...NativeUIManager,
createView(
@ -110,7 +110,7 @@ const UIManagerJS = {
// 3rd party libs may be calling `NativeModules.UIManager.getViewManagerConfig()`
// instead of `UIManager.getViewManagerConfig()` off UIManager.js.
// This is a workaround for now.
// $FlowFixMe
// $FlowFixMe[prop-missing]
NativeUIManager.getViewManagerConfig = UIManagerJS.getViewManagerConfig;
function lazifyViewManagerConfig(viewName) {

Просмотреть файл

@ -49,7 +49,7 @@ module.exports = {
return require('../Utilities/differ/deepDiffer');
},
get deepFreezeAndThrowOnMutationInDev(): deepFreezeAndThrowOnMutationInDev<
// $FlowFixMe - can't properly parameterize the getter's type
// $FlowFixMe[deprecated-type] - can't properly parameterize the getter's type
*,
> {
return require('../Utilities/deepFreezeAndThrowOnMutationInDev');

Просмотреть файл

@ -64,9 +64,9 @@ class StyleSheetValidation {
}
}
/* $FlowFixMe(>=0.85.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.85 was deployed. To see the error, delete this comment
* and run Flow. */
/* $FlowFixMe[signature-verification-failure] (>=0.85.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.85 was deployed. To
* see the error, delete this comment and run Flow. */
static addValidStylePropTypes(stylePropTypes) {
if (!__DEV__ || global.__RCTProfileIsProfiling) {
return;

Просмотреть файл

@ -173,9 +173,9 @@ function _validateTransform(key, value, transformation) {
value.length === 9 || value.length === 16,
'Matrix transform must have a length of 9 (2d) or 16 (3d). ' +
'Provided matrix has a length of %s: %s',
/* $FlowFixMe(>=0.84.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.84 was deployed. To see the error, delete
* this comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.84.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.84 was deployed. To
* see the error, delete this comment and run Flow. */
value.length,
stringifySafe(transformation),
);
@ -184,9 +184,9 @@ function _validateTransform(key, value, transformation) {
invariant(
value.length === 2 || value.length === 3,
'Transform with key translate must be an array of length 2 or 3, found %s: %s',
/* $FlowFixMe(>=0.84.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.84 was deployed. To see the error, delete
* this comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.84.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.84 was deployed. To
* see the error, delete this comment and run Flow. */
value.length,
stringifySafe(transformation),
);

Просмотреть файл

@ -14,9 +14,9 @@ const React = require('react');
const ReactTestRenderer = require('react-test-renderer');
const ShallowRenderer = require('react-shallow-renderer');
/* $FlowFixMe(>=0.125.1 site=react_native_fb) This comment suppresses an error
* found when Flow v0.125.1 was deployed. To see the error, delete this comment
* and run Flow. */
/* $FlowFixMe[not-a-function] (>=0.125.1 site=react_native_fb) This comment
* suppresses an error found when Flow v0.125.1 was deployed. To see the error,
* delete this comment and run Flow. */
const shallowRenderer = new ShallowRenderer();
import type {ReactTestRenderer as ReactTestRendererType} from 'react-test-renderer';
@ -27,9 +27,12 @@ export type ReactTestInstance = $PropertyType<ReactTestRendererType, 'root'>;
export type Predicate = (node: ReactTestInstance) => boolean;
type $ReturnType<Fn> = $Call<<Ret, A>((...A) => Ret) => Ret, Fn>;
/* $FlowFixMe(>=0.125.1 site=react_native_fb) This comment suppresses an error
* found when Flow v0.125.1 was deployed. To see the error, delete this comment
* and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.125.1 site=react_native_fb) This comment
* suppresses an error found when Flow v0.125.1 was deployed. To see the error,
* delete this comment and run Flow. */
/* $FlowFixMe[value-as-type] (>=0.125.1 site=react_native_fb) This comment
* suppresses an error found when Flow v0.125.1 was deployed. To see the error,
* delete this comment and run Flow. */
export type ReactTestRendererJSON = $ReturnType<ReactTestRenderer.create.toJSON>;
const {

Просмотреть файл

@ -85,14 +85,14 @@ describe('setAndForwardRef', () => {
it('should forward refs (createRef-based)', () => {
const createdRef = React.createRef<typeof ForwardedComponent>();
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.89 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[incompatible-type] (>=0.89.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.89 was deployed. To see
* the error, delete this comment and run Flow. */
ReactTestRenderer.create(<TestComponentWithRef ref={createdRef} />);
/* $FlowFixMe(>=0.87.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.87 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.87.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.87 was deployed. To see the
* error, delete this comment and run Flow. */
const val = createdRef.current && createdRef.current.testFunc();
expect(innerFuncCalled).toBe(true);

Просмотреть файл

@ -99,7 +99,7 @@ export function createStringifySafeWithLimits(limits: {|
} catch (e) {
if (typeof arg.toString === 'function') {
try {
// $FlowFixMe: toString shouldn't take any arguments in general.
// $FlowFixMe[incompatible-use] : toString shouldn't take any arguments in general.
return arg.toString();
} catch (E) {}
}

Просмотреть файл

@ -107,13 +107,13 @@ class WebSocket extends (EventTarget(...WEBSOCKET_EVENTS): any) {
console.warn(
'Specifying `origin` as a WebSocket connection option is deprecated. Include it under `headers` instead.',
);
/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error found when Flow v0.54 was deployed. To see
* the error delete this comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.54.0 site=react_native_fb,react_native_
* oss) This comment suppresses an error found when Flow v0.54 was
* deployed. To see the error delete this comment and run Flow. */
headers.origin = unrecognized.origin;
/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error found when Flow v0.54 was deployed. To see
* the error delete this comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.54.0 site=react_native_fb,react_native_
* oss) This comment suppresses an error found when Flow v0.54 was
* deployed. To see the error delete this comment and run Flow. */
delete unrecognized.origin;
}

Просмотреть файл

@ -21,7 +21,7 @@ import {PropsType, Type} from './Type';
import {HeaderWriter} from './HeaderWriter';
import {ImplementationWriter} from './ImplementationWriter';
// $FlowFixMe: this isn't a module, just a JSON file.
// $FlowFixMe[cannot-resolve-module] : this isn't a module, just a JSON file.
const standard = require('devtools-protocol/json/js_protocol.json');
const custom = require('../src/custom.json');

Просмотреть файл

@ -504,7 +504,10 @@ module.exports = {
};
if (__DEV__) {
// $FlowFixMe This is intentional: Flow will error when attempting to access ART.
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access ART. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access ART. */
Object.defineProperty(module.exports, 'ART', {
configurable: true,
get() {
@ -517,7 +520,10 @@ if (__DEV__) {
},
});
// $FlowFixMe This is intentional: Flow will error when attempting to access ListView.
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access ListView. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access ListView. */
Object.defineProperty(module.exports, 'ListView', {
configurable: true,
get() {
@ -530,7 +536,10 @@ if (__DEV__) {
},
});
// $FlowFixMe This is intentional: Flow will error when attempting to access SwipeableListView.
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access SwipeableListView. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access SwipeableListView. */
Object.defineProperty(module.exports, 'SwipeableListView', {
configurable: true,
get() {
@ -543,7 +552,10 @@ if (__DEV__) {
},
});
// $FlowFixMe This is intentional: Flow will error when attempting to access WebView.
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access WebView. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access WebView. */
Object.defineProperty(module.exports, 'WebView', {
configurable: true,
get() {
@ -556,7 +568,10 @@ if (__DEV__) {
},
});
// $FlowFixMe This is intentional: Flow will error when attempting to access NetInfo.
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access NetInfo. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access NetInfo. */
Object.defineProperty(module.exports, 'NetInfo', {
configurable: true,
get() {
@ -569,7 +584,10 @@ if (__DEV__) {
},
});
// $FlowFixMe This is intentional: Flow will error when attempting to access CameraRoll.
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access CameraRoll. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access CameraRoll. */
Object.defineProperty(module.exports, 'CameraRoll', {
configurable: true,
get() {
@ -582,7 +600,10 @@ if (__DEV__) {
},
});
// $FlowFixMe This is intentional: Flow will error when attempting to access ImageStore.
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access ImageStore. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access ImageStore. */
Object.defineProperty(module.exports, 'ImageStore', {
configurable: true,
get() {
@ -596,7 +617,10 @@ if (__DEV__) {
},
});
// $FlowFixMe This is intentional: Flow will error when attempting to access ImageEditor.
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access ImageEditor. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access ImageEditor. */
Object.defineProperty(module.exports, 'ImageEditor', {
configurable: true,
get() {
@ -609,7 +633,10 @@ if (__DEV__) {
},
});
// $FlowFixMe This is intentional: Flow will error when attempting to access TimePickerAndroid.
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access TimePickerAndroid. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access TimePickerAndroid. */
Object.defineProperty(module.exports, 'TimePickerAndroid', {
configurable: true,
get() {
@ -622,7 +649,10 @@ if (__DEV__) {
},
});
// $FlowFixMe This is intentional: Flow will error when attempting to access ToolbarAndroid.
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access ToolbarAndroid. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access ToolbarAndroid. */
Object.defineProperty(module.exports, 'ToolbarAndroid', {
configurable: true,
get() {
@ -635,7 +665,10 @@ if (__DEV__) {
},
});
// $FlowFixMe This is intentional: Flow will error when attempting to access ViewPagerAndroid.
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access ViewPagerAndroid. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access ViewPagerAndroid. */
Object.defineProperty(module.exports, 'ViewPagerAndroid', {
configurable: true,
get() {
@ -648,7 +681,10 @@ if (__DEV__) {
},
});
// $FlowFixMe This is intentional: Flow will error when attempting to access CheckBox.
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access CheckBox. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access CheckBox. */
Object.defineProperty(module.exports, 'CheckBox', {
configurable: true,
get() {

Просмотреть файл

@ -14,9 +14,9 @@ const React = require('react');
const ShallowRenderer = require('react-shallow-renderer');
const TestRenderer = require('react-test-renderer');
/* $FlowFixMe(>=0.125.1 site=react_native_fb) This comment suppresses an error
* found when Flow v0.125.1 was deployed. To see the error, delete this comment
* and run Flow. */
/* $FlowFixMe[not-a-function] (>=0.125.1 site=react_native_fb) This comment
* suppresses an error found when Flow v0.125.1 was deployed. To see the error,
* delete this comment and run Flow. */
const renderer = new ShallowRenderer();
export const shallow = (Component: React.Element<any>): any => {

Просмотреть файл

@ -59,7 +59,10 @@ const ErrorUtils = {
): ?TOut {
try {
_inGuard++;
// $FlowFixMe: TODO T48204745 (1) apply(context, null) is fine. (2) array -> rest array should work
/* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,
* null) is fine. (2) array -> rest array should work */
/* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,
* null) is fine. (2) array -> rest array should work */
return fun.apply(context, args);
} catch (e) {
ErrorUtils.reportError(e);
@ -74,7 +77,10 @@ const ErrorUtils = {
args?: ?TArgs,
): ?TOut {
if (ErrorUtils.inGuard()) {
// $FlowFixMe: TODO T48204745 (1) apply(context, null) is fine. (2) array -> rest array should work
/* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,
* null) is fine. (2) array -> rest array should work */
/* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,
* null) is fine. (2) array -> rest array should work */
return fun.apply(context, args);
} else {
ErrorUtils.applyWithGuard(fun, context, args);

Просмотреть файл

@ -231,11 +231,11 @@ function buildEventSchema(
}
}
// $FlowFixMe there's no flowtype for ASTs
// $FlowFixMe[unclear-type] there's no flowtype for ASTs
type EventTypeAST = Object;
type TypeMap = {
// $FlowFixMe there's no flowtype for ASTs
// $FlowFixMe[unclear-type] there's no flowtype for ASTs
[string]: Object,
...,
};

Просмотреть файл

@ -47,7 +47,7 @@ function removeKnownExtends(
);
}
// $FlowFixMe there's no flowtype for ASTs
// $FlowFixMe[unclear-type] there's no flowtype for ASTs
type PropsAST = Object;
function getExtendsProps(

Просмотреть файл

@ -167,7 +167,7 @@ function getCommandProperties(commandTypeName, types, commandOptions) {
return properties;
}
// $FlowFixMe there's no flowtype for AST
// $FlowFixMe[signature-verification-failure] there's no flowtype for AST
function buildComponentSchema(ast): ComponentSchemaBuilderConfig {
const {
componentName,

Просмотреть файл

@ -12,7 +12,7 @@
import type {OptionsShape} from '../../../CodegenSchema.js';
// $FlowFixMe there's no flowtype for ASTs
// $FlowFixMe[unclear-type] there's no flowtype for ASTs
type OptionsAST = Object;
export type CommandOptions = $ReadOnly<{

Просмотреть файл

@ -416,7 +416,7 @@ function buildPropSchema(
};
}
// $FlowFixMe there's no flowtype for ASTs
// $FlowFixMe[unclear-type] there's no flowtype for ASTs
type PropAST = Object;
function verifyPropNotAlreadyDefined(

Просмотреть файл

@ -11,7 +11,7 @@
'use strict';
import type {SchemaType} from '../../CodegenSchema.js';
// $FlowFixMe there's no flowtype flow-parser
// $FlowFixMe[untyped-import] there's no flowtype flow-parser
const flowParser = require('flow-parser');
const fs = require('fs');
const path = require('path');

Просмотреть файл

@ -41,7 +41,7 @@ function getTypes(ast: $FlowFixMe): TypeDeclarationMap {
}, {});
}
// $FlowFixMe there's no flowtype for ASTs
// $FlowFixMe[unclear-type] there's no flowtype for ASTs
export type ASTNode = Object;
const invariant = require('invariant');

Просмотреть файл

@ -14,7 +14,7 @@ import type {SchemaType} from '../../CodegenSchema.js';
function parse(filename: string): ?SchemaType {
try {
// $FlowFixMe Can't require dynamic variables
// $FlowFixMe[unsupported-syntax] Can't require dynamic variables
return require(filename);
} catch (err) {
// Ignore

Просмотреть файл

@ -47,9 +47,9 @@ const styles = StyleSheet.create({
justifyContent: 'space-between',
},
});
/* $FlowFixMe(>=0.85.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.85 was deployed. To see the error, delete this comment
* and run Flow. */
/* $FlowFixMe[cannot-reassign-export] (>=0.85.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.85 was deployed. To see the
* error, delete this comment and run Flow. */
RNTesterSettingSwitchRow = RNTesterStatePersister.createContainer(
RNTesterSettingSwitchRow,
{

Просмотреть файл

@ -32,7 +32,8 @@ class PromptOptions extends React.Component<Props, State> {
constructor(props) {
super(props);
// $FlowFixMe this seems to be a Flow bug, `saveResponse` is defined below
/* $FlowFixMe[cannot-write] this seems to be a Flow bug, `saveResponse` is
* defined below */
this.saveResponse = this.saveResponse.bind(this);
this.customButtons = [

Просмотреть файл

@ -108,16 +108,16 @@ class Circle extends React.Component<any, any> {
onResponderGrant: () => {
this.state.pan.setValue({x: 0, y: 0}); // reset (step1: uncomment)
this.state.pan.setOffset(this.props.restLayout); // offset from onLayout (step1: uncomment)
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses
* an error found when Flow v0.63 was deployed. To see the error
* delete this comment and run Flow. */
/* $FlowFixMe[incompatible-type] (>=0.63.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.63 was deployed. To
* see the error delete this comment and run Flow. */
this.longTimer = setTimeout(this._onLongPress, 300);
},
onResponderRelease: () => {
if (!this.state.panResponder) {
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.63 was deployed. To see
* the error delete this comment and run Flow. */
/* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.63 was
* deployed. To see the error delete this comment and run Flow. */
clearTimeout(this.longTimer);
this._toggleIsActive();
}

Просмотреть файл

@ -243,9 +243,9 @@ class FlatListExample extends React.PureComponent<Props, State> {
return {
renderItem: undefined,
/* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.111 was deployed. To see the error, delete
* this comment and run Flow. */
/* $FlowFixMe[invalid-computed-prop] (>=0.111.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.111 was deployed.
* To see the error, delete this comment and run Flow. */
[flatListPropKey]: ({item, separators}) => {
return (
<ItemComponent

Просмотреть файл

@ -972,9 +972,10 @@ exports.examples = [
source={image}
/>
</View>
{/* $FlowFixMe(>=0.115.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.115 was deployed.
* To see the error, delete this comment and run Flow. */}
{/* $FlowFixMe[incompatible-type] (>=0.115.0 site=react_
* native_fb) This comment suppresses an error found when
* Flow v0.115 was deployed. To see the error, delete this
* comment and run Flow. */}
<View style={styles.leftMargin}>
<Text style={[styles.resizeModeText]}>Cover</Text>
<Image
@ -993,9 +994,10 @@ exports.examples = [
source={image}
/>
</View>
{/* $FlowFixMe(>=0.115.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.115 was deployed.
* To see the error, delete this comment and run Flow. */}
{/* $FlowFixMe[incompatible-type] (>=0.115.0 site=react_
* native_fb) This comment suppresses an error found when
* Flow v0.115 was deployed. To see the error, delete this
* comment and run Flow. */}
<View style={styles.leftMargin}>
<Text style={[styles.resizeModeText]}>Repeat</Text>
<Image
@ -1004,9 +1006,10 @@ exports.examples = [
source={image}
/>
</View>
{/* $FlowFixMe(>=0.115.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.115 was deployed.
* To see the error, delete this comment and run Flow. */}
{/* $FlowFixMe[incompatible-type] (>=0.115.0 site=react_
* native_fb) This comment suppresses an error found when
* Flow v0.115 was deployed. To see the error, delete this
* comment and run Flow. */}
<View style={styles.leftMargin}>
<Text style={[styles.resizeModeText]}>Center</Text>
<Image
@ -1058,9 +1061,12 @@ exports.examples = [
{
title: 'Image Size',
render: function(): React.Node {
/* $FlowFixMe(>=0.115.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.115 was deployed. To see the error, delete
* this comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.115.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.115 was deployed. To see the
* error, delete this comment and run Flow. */
/* $FlowFixMe[incompatible-type] (>=0.115.0 site=react_native_fb) This
* comment suppresses an error found when Flow v0.115 was deployed. To
* see the error, delete this comment and run Flow. */
return <ImageSizeExample source={fullImage} />;
},
},

Просмотреть файл

@ -107,9 +107,10 @@ class LayoutEventExample extends React.Component<Props, State> {
/>
<Text>
ViewLayout:{' '}
{/* $FlowFixMe(>=0.95.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.95 was deployed. To see
* the error, delete this comment and run Flow. */
{/* $FlowFixMe[incompatible-type] (>=0.95.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.95 was
* deployed. To see the error, delete this comment and run Flow.
*/
JSON.stringify(this.state.viewLayout, null, ' ') + '\n\n'}
</Text>
<Text ref="txt" onLayout={this.onTextLayout} style={styles.text}>

Просмотреть файл

@ -145,9 +145,9 @@ class LoopExample extends React.Component<{...}, $FlowFixMeState> {
{
opacity: this.state.value.interpolate({
inputRange: [0, 0.5, 1],
/* $FlowFixMe(>=0.38.0) - Flow error detected during the
* deployment of v0.38.0. To see the error, remove this comment
* and run flow */
/* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error
* detected during the deployment of v0.38.0. To see the error,
* remove this comment and run flow */
outputRange: [0, 1, 0],
}),
},
@ -175,9 +175,9 @@ class InternalSettings extends React.Component<
initialValue={false}
label="Force JS Stalls"
onEnable={() => {
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.63 was deployed. To see
* the error delete this comment and run Flow. */
/* $FlowFixMe[incompatible-type] (>=0.63.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.63 was
* deployed. To see the error delete this comment and run Flow. */
this._stallInterval = setInterval(() => {
const start = Date.now();
console.warn('burn CPU');
@ -185,9 +185,9 @@ class InternalSettings extends React.Component<
}, 300);
}}
onDisable={() => {
/* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.63 was deployed. To see
* the error delete this comment and run Flow. */
/* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.63 was
* deployed. To see the error delete this comment and run Flow. */
clearInterval(this._stallInterval || 0);
}}
/>
@ -243,9 +243,9 @@ class EventExample extends React.Component<{...}, $FlowFixMeState> {
{
rotate: this.state.anim.interpolate({
inputRange: [0, 1],
/* $FlowFixMe(>=0.38.0) - Flow error detected during the
* deployment of v0.38.0. To see the error, remove this
* comment and run flow */
/* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow
* error detected during the deployment of v0.38.0. To see
* the error, remove this comment and run flow */
outputRange: ['0deg', '1deg'],
}),
},

Просмотреть файл

@ -41,9 +41,10 @@ class ExampleBox extends React.Component<$FlowFixMeProps, $FlowFixMeState> {
<View
onTouchEndCapture={this.handleTouchCapture}
onTouchStart={this.flushReactChanges}>
{/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */}
{/* $FlowFixMe[type-as-value] (>=0.53.0 site=react_native_fb,react_
* native_oss) This comment suppresses an error when upgrading
* Flow's support for React. To see the error delete this comment
* and run Flow. */}
<this.props.Component onLog={this.handleLog} />
</View>
<View style={styles.logBox}>

Просмотреть файл

@ -39,14 +39,16 @@ class ScrollViewAnimatedExample extends Component<{...}> {
render(): React.Node {
const interpolated = this._scrollViewPos.interpolate({
inputRange: [0, 1],
/* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment of
* v0.38.0. To see the error, remove this comment and run flow */
/* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error detected
* during the deployment of v0.38.0. To see the error, remove this
* comment and run flow */
outputRange: [0, 0.1],
});
const interpolated2 = this._scrollViewPos.interpolate({
inputRange: [0, 1],
/* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment of
* v0.38.0. To see the error, remove this comment and run flow */
/* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error detected
* during the deployment of v0.38.0. To see the error, remove this
* comment and run flow */
outputRange: ['0deg', '1deg'],
});
return (

Просмотреть файл

@ -47,7 +47,7 @@ class SnapshotViewIOS extends React.Component<Props> {
const testIdentifier = this.props.testIdentifier || 'test';
const onSnapshotReady = this.props.onSnapshotReady || this.onDefaultAction;
return (
// $FlowFixMe - Typing ReactNativeComponent revealed errors
// $FlowFixMe[prop-missing] - Typing ReactNativeComponent revealed errors
<RCTSnapshot
style={style.snapshot}
{...this.props}

Просмотреть файл

@ -38,9 +38,9 @@ function AnimateTansformSingleProp() {
{
rotate: theta.interpolate({
inputRange: [0, 100],
/* $FlowFixMe(>=0.38.0) - Flow error detected during the
* deployment of v0.38.0. To see the error, remove this
* comment and run flow */
/* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error
* detected during the deployment of v0.38.0. To see the
* error, remove this comment and run flow */
outputRange: ['0deg', '360deg'],
}),
},
@ -79,9 +79,9 @@ function Flip() {
{
rotateX: theta.interpolate({
inputRange: [0, 180],
/* $FlowFixMe(>=0.38.0) - Flow error detected during the
* deployment of v0.38.0. To see the error, remove this
* comment and run flow */
/* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error
* detected during the deployment of v0.38.0. To see the
* error, remove this comment and run flow */
outputRange: ['0deg', '180deg'],
}),
},
@ -100,9 +100,9 @@ function Flip() {
{
rotateX: theta.interpolate({
inputRange: [0, 180],
/* $FlowFixMe(>=0.38.0) - Flow error detected during the
* deployment of v0.38.0. To see the error, remove this
* comment and run flow */
/* $FlowFixMe[speculation-ambiguous] (>=0.38.0) - Flow error
* detected during the deployment of v0.38.0. To see the
* error, remove this comment and run flow */
outputRange: ['180deg', '360deg'],
}),
},

Просмотреть файл

@ -75,14 +75,14 @@ class SampleTurboModuleExample extends React.Component<{||}, State> {
_setResult(name, result) {
this.setState(({testResults}) => ({
/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.122.0 was deployed. To see the error, delete
* this comment and run Flow. */
/* $FlowFixMe[cannot-spread-indexer] (>=0.122.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.122.0 was
* deployed. To see the error, delete this comment and run Flow. */
testResults: {
...testResults,
/* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses
* an error found when Flow v0.111 was deployed. To see the error,
* delete this comment and run Flow. */
/* $FlowFixMe[invalid-computed-prop] (>=0.111.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.111 was
* deployed. To see the error, delete this comment and run Flow. */
[name]: {value: result, type: typeof result},
},
}));