From 0c70c0166ed632903461a0393f0eb799ec70fa94 Mon Sep 17 00:00:00 2001 From: Panos Vekris Date: Thu, 22 May 2025 02:50:47 -0700 Subject: [PATCH] pre-suppress errors for natural inference rollout in xplat/js (#51524) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51524 Links in error suppressions will point to the announcement post in Flow FYI. Changelog: [Internal] drop-conflicts Reviewed By: marcoww6 Differential Revision: D75188177 fbshipit-source-id: 27ea1fbee848e9371e679cf423e30bc9608edea0 --- .../src/__tests__/SchemaValidator-test.js | 4 ++++ .../GeneratePropsJavaPojo/PojoCollector.js | 2 ++ .../parsers/__tests__/parsers-commons-test.js | 2 ++ .../__tests__/parsers-primitives-test.js | 20 +++++++++++++++++++ .../src/parsers/flow/modules/index.js | 2 ++ .../src/parsers/parserMock.js | 6 ++++++ .../src/parsers/typescript/modules/index.js | 2 ++ .../src/parsers/typescript/parser.js | 2 ++ .../Libraries/Blob/BlobManager.js | 4 ++++ .../Components/Touchable/Touchable.js | 10 ++++++++++ .../Interaction/InteractionManager.js | 8 ++++++++ .../Libraries/LogBox/Data/parseLogBoxLog.js | 2 ++ .../react-native/Libraries/LogBox/LogBox.js | 2 ++ .../react-native/Libraries/Modal/Modal.js | 4 ++++ .../StaticViewConfigValidator-test.js | 6 ++++++ .../Libraries/Text/TextNativeComponent.js | 4 ++++ .../private/animated/NativeAnimatedHelper.js | 2 ++ .../rn-tester/js/components/TextLegend.js | 8 +++++++- .../js/examples/Alert/AlertExample.js | 6 ++++++ .../DrawerLayoutAndroidExample.js | 2 ++ .../PointerEventAccessibility.js | 4 ++++ .../PointerEventClickTouchHierarchy.js | 4 ++++ ...erEventClickTouchHierarchyPointerEvents.js | 8 ++++++++ .../KeyboardAvoidingViewExample.js | 2 ++ .../js/examples/Layout/LayoutExample.js | 2 ++ .../js/examples/Pressable/PressableExample.js | 10 ++++++++++ .../rn-tester/js/examples/RTL/RTLExample.js | 18 +++++++++++++++++ .../examples/ScrollView/ScrollViewExample.js | 14 +++++++++++++ .../SetPropertiesExampleApp.js | 2 ++ .../js/examples/Text/TextExample.android.js | 14 +++++++++++++ .../js/examples/Text/TextExample.ios.js | 18 +++++++++++++++++ scripts/build-types/index.js | 2 ++ .../prepare-flow-api-translator.js | 2 ++ scripts/build/build.js | 4 ++++ scripts/build/clean.js | 2 ++ scripts/debugger-frontend/sync-and-build.js | 2 ++ scripts/e2e/init-project-e2e.js | 2 ++ .../releases-ci/publish-updated-packages.js | 2 ++ scripts/releases/set-rn-artifacts-version.js | 2 ++ scripts/releases/set-version.js | 2 ++ 40 files changed, 213 insertions(+), 1 deletion(-) diff --git a/packages/react-native-codegen/src/__tests__/SchemaValidator-test.js b/packages/react-native-codegen/src/__tests__/SchemaValidator-test.js index 35ceb0befba..0232773d880 100644 --- a/packages/react-native-codegen/src/__tests__/SchemaValidator-test.js +++ b/packages/react-native-codegen/src/__tests__/SchemaValidator-test.js @@ -28,6 +28,8 @@ describe('SchemaValidator', () => { it('fails on components across modules with same name', () => { const fixture: SchemaType = { modules: { + /* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ Module1: { type: 'Component', components: { @@ -44,6 +46,8 @@ describe('SchemaValidator', () => { }, }, }, + /* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ Module2: { type: 'Component', components: { diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/PojoCollector.js b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/PojoCollector.js index 17c717e2e0f..6edfbf40622 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/PojoCollector.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsJavaPojo/PojoCollector.js @@ -145,6 +145,8 @@ class PojoCollector { } })(); + /* $FlowFixMe[incompatible-return] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ return { type: 'ArrayTypeAnnotation', elementType: pojoElementType, diff --git a/packages/react-native-codegen/src/parsers/__tests__/parsers-commons-test.js b/packages/react-native-codegen/src/parsers/__tests__/parsers-commons-test.js index 2b65ebb8dba..2b4425a4d70 100644 --- a/packages/react-native-codegen/src/parsers/__tests__/parsers-commons-test.js +++ b/packages/react-native-codegen/src/parsers/__tests__/parsers-commons-test.js @@ -422,6 +422,8 @@ describe('buildSchemaFromConfigType', () => { astMock, wrapComponentSchemaMock, buildComponentSchemaMock, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ buildModuleSchemaMock, parser, flowTranslateTypeAnnotation, diff --git a/packages/react-native-codegen/src/parsers/__tests__/parsers-primitives-test.js b/packages/react-native-codegen/src/parsers/__tests__/parsers-primitives-test.js index 2bb37512199..1860af2c995 100644 --- a/packages/react-native-codegen/src/parsers/__tests__/parsers-primitives-test.js +++ b/packages/react-native-codegen/src/parsers/__tests__/parsers-primitives-test.js @@ -379,7 +379,11 @@ describe('typeAliasResolution', () => { it('returns nullable TypeAliasTypeAnnotation and map it in aliasMap', () => { const aliasMap = {}; const result = typeAliasResolution( + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ typeResolution, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ objectTypeAnnotation, aliasMap, true, @@ -400,7 +404,11 @@ describe('typeAliasResolution', () => { it('returns non nullable TypeAliasTypeAnnotation and map it in aliasMap', () => { const aliasMap = {}; const result = typeAliasResolution( + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ typeResolution, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ objectTypeAnnotation, aliasMap, false, @@ -422,7 +430,11 @@ describe('typeAliasResolution', () => { it('returns nullable ObjectTypeAnnotation', () => { const aliasMap = {}; const result = typeAliasResolution( + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ typeResolution, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ objectTypeAnnotation, aliasMap, true, @@ -440,7 +452,11 @@ describe('typeAliasResolution', () => { it('returns non nullable ObjectTypeAnnotation', () => { const aliasMap = {}; const result = typeAliasResolution( + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ typeResolution, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ objectTypeAnnotation, aliasMap, false, @@ -1230,6 +1246,8 @@ describe('emitUnion', () => { const expected = new UnsupportedUnionTypeAnnotationParserError( hasteModuleName, typeAnnotation, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ unionTypes, ); @@ -1244,6 +1262,8 @@ describe('emitUnion', () => { const expected = new UnsupportedUnionTypeAnnotationParserError( hasteModuleName, typeAnnotation, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ unionTypes, ); diff --git a/packages/react-native-codegen/src/parsers/flow/modules/index.js b/packages/react-native-codegen/src/parsers/flow/modules/index.js index 501264ca3d6..40d63cd3afc 100644 --- a/packages/react-native-codegen/src/parsers/flow/modules/index.js +++ b/packages/react-native-codegen/src/parsers/flow/modules/index.js @@ -222,6 +222,8 @@ function translateTypeAnnotation( return typeAliasResolution( typeResolutionStatus, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ objectTypeAnnotation, aliasMap, nullable, diff --git a/packages/react-native-codegen/src/parsers/parserMock.js b/packages/react-native-codegen/src/parsers/parserMock.js index c99b98272f7..a906a348e9d 100644 --- a/packages/react-native-codegen/src/parsers/parserMock.js +++ b/packages/react-native-codegen/src/parsers/parserMock.js @@ -116,14 +116,20 @@ export class MockedParser implements Parser { } parseFile(filename: string): SchemaType { + /* $FlowFixMe[incompatible-return] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ return schemaMock; } parseString(contents: string, filename: ?string): SchemaType { + /* $FlowFixMe[incompatible-return] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ return schemaMock; } parseModuleFixture(filename: string): SchemaType { + /* $FlowFixMe[incompatible-return] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ return schemaMock; } diff --git a/packages/react-native-codegen/src/parsers/typescript/modules/index.js b/packages/react-native-codegen/src/parsers/typescript/modules/index.js index f45150020e7..16b407bf03a 100644 --- a/packages/react-native-codegen/src/parsers/typescript/modules/index.js +++ b/packages/react-native-codegen/src/parsers/typescript/modules/index.js @@ -103,6 +103,8 @@ function translateObjectTypeAnnotation( return typeAliasResolution( typeResolutionStatus, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ objectTypeAnnotation, aliasMap, nullable, diff --git a/packages/react-native-codegen/src/parsers/typescript/parser.js b/packages/react-native-codegen/src/parsers/typescript/parser.js index 0c11de8bf36..ca01a904c66 100644 --- a/packages/react-native-codegen/src/parsers/typescript/parser.js +++ b/packages/react-native-codegen/src/parsers/typescript/parser.js @@ -118,6 +118,8 @@ class TypeScriptParser implements Parser { : 'ObjectTypeAnnotation'; }; + /* $FlowFixMe[incompatible-return] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ return [...new Set(membersTypes.map(remapLiteral))]; } diff --git a/packages/react-native/Libraries/Blob/BlobManager.js b/packages/react-native/Libraries/Blob/BlobManager.js index 8426f1d589a..da8bbab24f7 100644 --- a/packages/react-native/Libraries/Blob/BlobManager.js +++ b/packages/react-native/Libraries/Blob/BlobManager.js @@ -86,8 +86,12 @@ class BlobManager { }); const size = items.reduce((acc, curr) => { if (curr.type === 'string') { + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ return acc + global.unescape(encodeURI(curr.data)).length; } else { + /* $FlowFixMe[prop-missing] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ return acc + curr.data.size; } }, 0); diff --git a/packages/react-native/Libraries/Components/Touchable/Touchable.js b/packages/react-native/Libraries/Components/Touchable/Touchable.js index 0e81a0b1559..9d0057474a7 100644 --- a/packages/react-native/Libraries/Components/Touchable/Touchable.js +++ b/packages/react-native/Libraries/Components/Touchable/Touchable.js @@ -869,11 +869,15 @@ const TouchableMixinImpl = { curState === States.NOT_RESPONDER && nextState === States.RESPONDER_INACTIVE_PRESS_IN; + /* $FlowFixMe[invalid-computed-prop] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ const isActiveTransition = !IsActive[curState] && IsActive[nextState]; if (isInitialTransition || isActiveTransition) { this._remeasureMetricsOnActivation(); } + /* $FlowFixMe[invalid-computed-prop] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ if (IsPressingIn[curState] && signal === Signals.LONG_PRESS_DETECTED) { this.touchableHandleLongPress && this.touchableHandleLongPress(e); } @@ -884,13 +888,19 @@ const TouchableMixinImpl = { this._endHighlight(e); } + /* $FlowFixMe[invalid-computed-prop] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ if (IsPressingIn[curState] && signal === Signals.RESPONDER_RELEASE) { const hasLongPressHandler = !!this.props.onLongPress; const pressIsLongButStillCallOnPress = + /* $FlowFixMe[invalid-computed-prop] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ IsLongPressingIn[curState] && // We *are* long pressing.. // But either has no long handler (!hasLongPressHandler || !this.touchableLongPressCancelsPress()); // or we're told to ignore it. const shouldInvokePress = + /* $FlowFixMe[invalid-computed-prop] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ !IsLongPressingIn[curState] || pressIsLongButStillCallOnPress; if (shouldInvokePress && this.touchableHandlePress) { if (!newIsHighlight && !curIsHighlight) { diff --git a/packages/react-native/Libraries/Interaction/InteractionManager.js b/packages/react-native/Libraries/Interaction/InteractionManager.js index d27f1ba4934..8da81491828 100644 --- a/packages/react-native/Libraries/Interaction/InteractionManager.js +++ b/packages/react-native/Libraries/Interaction/InteractionManager.js @@ -194,9 +194,17 @@ function _processUpdate() { if (interactionCount !== 0 && nextInteractionCount === 0) { // transition from 1+ --> 0 interactions + /* $FlowFixMe[prop-missing] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ + /* $FlowFixMe[invalid-computed-prop] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ _emitter.emit(InteractionManager.Events.interactionComplete); } else if (interactionCount === 0 && nextInteractionCount !== 0) { // transition from 0 --> 1+ interactions + /* $FlowFixMe[prop-missing] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ + /* $FlowFixMe[invalid-computed-prop] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ _emitter.emit(InteractionManager.Events.interactionStart); } diff --git a/packages/react-native/Libraries/LogBox/Data/parseLogBoxLog.js b/packages/react-native/Libraries/LogBox/Data/parseLogBoxLog.js index bff7e0352ae..fb3212a142d 100644 --- a/packages/react-native/Libraries/LogBox/Data/parseLogBoxLog.js +++ b/packages/react-native/Libraries/LogBox/Data/parseLogBoxLog.js @@ -509,6 +509,8 @@ export function parseLogBoxLog(args: $ReadOnlyArray): { return { ...parseInterpolation(argsWithoutComponentStack), componentStack, + /* $FlowFixMe[incompatible-return] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ componentStackType, }; } diff --git a/packages/react-native/Libraries/LogBox/LogBox.js b/packages/react-native/Libraries/LogBox/LogBox.js index bc0eb4b3042..e70f520eb3a 100644 --- a/packages/react-native/Libraries/LogBox/LogBox.js +++ b/packages/react-native/Libraries/LogBox/LogBox.js @@ -261,6 +261,8 @@ if (__DEV__) { if (!LogBoxData.isMessageIgnored(message.content)) { LogBoxData.addLog({ + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ level, category, message, diff --git a/packages/react-native/Libraries/Modal/Modal.js b/packages/react-native/Libraries/Modal/Modal.js index ca9c45977d9..e67fda4a1fd 100644 --- a/packages/react-native/Libraries/Modal/Modal.js +++ b/packages/react-native/Libraries/Modal/Modal.js @@ -308,6 +308,8 @@ class Modal extends React.Component { return ( =0.111.0 site=react_native_fb) This * comment suppresses an error found when Flow v0.111 was deployed. To see diff --git a/packages/react-native/Libraries/NativeComponent/__tests__/StaticViewConfigValidator-test.js b/packages/react-native/Libraries/NativeComponent/__tests__/StaticViewConfigValidator-test.js index ed19bd0554f..5c4a13ac13e 100644 --- a/packages/react-native/Libraries/NativeComponent/__tests__/StaticViewConfigValidator-test.js +++ b/packages/react-native/Libraries/NativeComponent/__tests__/StaticViewConfigValidator-test.js @@ -81,7 +81,11 @@ test('passes for identical configs', () => { const validationResult = StaticViewConfigValidator.validate( name, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ nativeViewConfig, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ staticViewConfig, ); @@ -202,6 +206,8 @@ test('allows static viewconfigs to have more properties than native viewconfigs' const validationResult = StaticViewConfigValidator.validate( name, nativeViewConfig, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ staticViewConfig, ); diff --git a/packages/react-native/Libraries/Text/TextNativeComponent.js b/packages/react-native/Libraries/Text/TextNativeComponent.js index 89e59b29ec6..709dd5613ed 100644 --- a/packages/react-native/Libraries/Text/TextNativeComponent.js +++ b/packages/react-native/Libraries/Text/TextNativeComponent.js @@ -67,6 +67,8 @@ const virtualTextViewConfig = { export const NativeText: HostComponent = (createReactNativeComponentClass('RCTText', () => + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ createViewConfig(textViewConfig), ): any); @@ -74,5 +76,7 @@ export const NativeVirtualText: HostComponent = !global.RN$Bridgeless && !UIManager.hasViewManagerConfig('RCTVirtualText') ? NativeText : (createReactNativeComponentClass('RCTVirtualText', () => + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ createViewConfig(virtualTextViewConfig), ): any); diff --git a/packages/react-native/src/private/animated/NativeAnimatedHelper.js b/packages/react-native/src/private/animated/NativeAnimatedHelper.js index 805e2eb8c22..6ad2ea8ec91 100644 --- a/packages/react-native/src/private/animated/NativeAnimatedHelper.js +++ b/packages/react-native/src/private/animated/NativeAnimatedHelper.js @@ -107,6 +107,8 @@ function createNativeOperations(): $NonMaybeType { for (let ii = 0, length = methodNames.length; ii < length; ii++) { const methodName = methodNames[ii]; nativeOperations[methodName] = (...args) => { + /* $FlowFixMe[prop-missing] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ const method = nullthrows(NativeAnimatedModule)[methodName]; // If queueing is explicitly on, *or* the queue has not yet // been flushed, use the queue. This is to prevent operations diff --git a/packages/rn-tester/js/components/TextLegend.js b/packages/rn-tester/js/components/TextLegend.js index 3a5c62dc9b4..0aceb85c0ee 100644 --- a/packages/rn-tester/js/components/TextLegend.js +++ b/packages/rn-tester/js/components/TextLegend.js @@ -204,11 +204,17 @@ export default function TextLegend(): React.Node { onTextLayout={event => { setTextMetrics(event.nativeEvent.lines); }} + /* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ style={{ fontSize: fontSize, textAlign: alignment, }}> - {PANGRAMS[language]} + { + /* $FlowFixMe[invalid-computed-prop] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ + PANGRAMS[language] + } diff --git a/packages/rn-tester/js/examples/Alert/AlertExample.js b/packages/rn-tester/js/examples/Alert/AlertExample.js index 027614271aa..6b5140df209 100644 --- a/packages/rn-tester/js/examples/Alert/AlertExample.js +++ b/packages/rn-tester/js/examples/Alert/AlertExample.js @@ -261,6 +261,8 @@ const PromptOptions = () => { Alert.prompt('Type a value', null, customButtons)}> prompt with title & custom buttons @@ -306,6 +308,8 @@ const PromptOptions = () => { Alert.prompt( 'Type a value', null, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ customButtons, 'login-password', 'admin@site.com', @@ -453,5 +457,7 @@ export default ({ documentationURL: 'https://reactnative.dev/docs/alert', description: 'Alerts display a concise and informative message and prompt the user to make a decision.', + /* $FlowFixMe[incompatible-cast] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ examples, }: RNTesterModule); diff --git a/packages/rn-tester/js/examples/DrawerLayoutAndroid/DrawerLayoutAndroidExample.js b/packages/rn-tester/js/examples/DrawerLayoutAndroid/DrawerLayoutAndroidExample.js index c677c8947f7..f3c06824455 100644 --- a/packages/rn-tester/js/examples/DrawerLayoutAndroid/DrawerLayoutAndroidExample.js +++ b/packages/rn-tester/js/examples/DrawerLayoutAndroid/DrawerLayoutAndroidExample.js @@ -51,6 +51,8 @@ const Drawer = () => { ref={drawer} accessibilityRole="drawerlayout" drawerWidth={300} + /* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ drawerPosition={drawerPosition} renderNavigationView={navigationView}> diff --git a/packages/rn-tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAccessibility.js b/packages/rn-tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAccessibility.js index b407a5a9122..c8043ca7953 100644 --- a/packages/rn-tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAccessibility.js +++ b/packages/rn-tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventAccessibility.js @@ -29,12 +29,16 @@ export default function PointerEventAccessibility(props: {}): React.MixedElement diff --git a/packages/rn-tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventClickTouchHierarchyPointerEvents.js b/packages/rn-tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventClickTouchHierarchyPointerEvents.js index b1433c8fcea..ddca4513aae 100644 --- a/packages/rn-tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventClickTouchHierarchyPointerEvents.js +++ b/packages/rn-tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventClickTouchHierarchyPointerEvents.js @@ -97,12 +97,16 @@ function PointerEventClickTouchHierarchyPointerEventsTestCase( { return ( + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {children}; } diff --git a/packages/rn-tester/js/examples/Pressable/PressableExample.js b/packages/rn-tester/js/examples/Pressable/PressableExample.js index 56eda96190c..9533aa03e49 100644 --- a/packages/rn-tester/js/examples/Pressable/PressableExample.js +++ b/packages/rn-tester/js/examples/Pressable/PressableExample.js @@ -471,6 +471,8 @@ const examples = [ + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. + * See https://fburl.com/workplace/6291gfvu */} radius 30 @@ -479,6 +481,8 @@ const examples = [ + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. + * See https://fburl.com/workplace/6291gfvu */} radius 150 @@ -487,6 +491,8 @@ const examples = [ + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. + * See https://fburl.com/workplace/6291gfvu */} radius 70, with border @@ -496,6 +502,8 @@ const examples = [ + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} with border, default color and radius @@ -596,5 +604,7 @@ module.exports = ({ category: 'UI', description: 'Component for making views pressable.', displayName: 'Pressable', + /* $FlowFixMe[incompatible-cast] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ examples, }: RNTesterModule); diff --git a/packages/rn-tester/js/examples/RTL/RTLExample.js b/packages/rn-tester/js/examples/RTL/RTLExample.js index 702b489989d..e0e7c075745 100644 --- a/packages/rn-tester/js/examples/RTL/RTLExample.js +++ b/packages/rn-tester/js/examples/RTL/RTLExample.js @@ -67,6 +67,8 @@ const TextAlignmentExample = withRTLState(({isRTL, setRTL, ...props}) => { return ( + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} Left-to-Right language without text alignment. @@ -91,6 +93,8 @@ const TextInputExample = withRTLState(({isRTL, setRTL, ...props}) => { return ( + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} LRT or RTL TextInput. @@ -103,6 +107,8 @@ const IconsExample = withRTLState(({isRTL, setRTL}) => { return ( + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} { return ( + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} @@ -439,6 +447,8 @@ const BorderWidthExample = withRTLState(({isRTL, setRTL}) => { borderEndWidth: 50 Demo: + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} { borderEndColor: 'green', Demo: + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} { borderBottomEndRadius: 40 Demo: + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} { borderEndEndRadius: 40 Demo: + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} { borderBottomEndRadius: 40 Demo: + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {scrolledToTop ? ( + /* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ scrolledToTop invoked ) : null} { return ( + {/* $FlowFixMe[incompatible-use] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} { return ( onScroll: {onScrollDrag} + {/* $FlowFixMe[incompatible-use] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} setOnScrollDrag('onScrollBeginDrag')} @@ -972,6 +978,8 @@ const KeyboardExample = () => { value={textInputValue} onChangeText={val => setTextInputValue(val)} /> + {/* $FlowFixMe[incompatible-use] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} { const [indicatorStyle, setIndicatorStyle] = useState('default'); return ( + {/* $FlowFixMe[incompatible-use] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} { const [decelRate, setDecelRate] = useState('normal'); return ( + {/* $FlowFixMe[incompatible-use] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} { useState('never'); return ( + {/* $FlowFixMe[incompatible-use] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} { }; return ( + /* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ Embedded React Native view diff --git a/packages/rn-tester/js/examples/Text/TextExample.android.js b/packages/rn-tester/js/examples/Text/TextExample.android.js index 6e2e1287a3d..fb992bb8b82 100644 --- a/packages/rn-tester/js/examples/Text/TextExample.android.js +++ b/packages/rn-tester/js/examples/Text/TextExample.android.js @@ -1121,6 +1121,8 @@ function TextBaseLineLayoutExample(props: {}): React.Node { return ( + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {'Nested s:'} {marker} @@ -1128,6 +1130,8 @@ function TextBaseLineLayoutExample(props: {}): React.Node { {marker} + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {'Array of s in :'} @@ -1137,6 +1141,8 @@ function TextBaseLineLayoutExample(props: {}): React.Node { {marker} + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {'Interleaving and :'} @@ -1158,6 +1164,8 @@ function TextBaseLineLayoutExample(props: {}): React.Node { {marker} + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {'Multi-line interleaved and :'} @@ -1175,6 +1183,8 @@ function TextBaseLineLayoutExample(props: {}): React.Node { + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {'Multi-line alignment'} @@ -1194,6 +1204,8 @@ function TextBaseLineLayoutExample(props: {}): React.Node { + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {':'} {marker} @@ -1201,6 +1213,8 @@ function TextBaseLineLayoutExample(props: {}): React.Node { {marker} + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {':'} diff --git a/packages/rn-tester/js/examples/Text/TextExample.ios.js b/packages/rn-tester/js/examples/Text/TextExample.ios.js index 0780cafa78b..ce2d3a4bba4 100644 --- a/packages/rn-tester/js/examples/Text/TextExample.ios.js +++ b/packages/rn-tester/js/examples/Text/TextExample.ios.js @@ -300,6 +300,8 @@ class TextBaseLineLayoutExample extends React.Component<{}, mixed> { return ( + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {'Nested s:'} {marker} @@ -307,6 +309,8 @@ class TextBaseLineLayoutExample extends React.Component<{}, mixed> { {marker} + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {'Array of s in :'} {marker} @@ -314,6 +318,8 @@ class TextBaseLineLayoutExample extends React.Component<{}, mixed> { {marker} + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {'Interleaving and :'} {marker} @@ -333,6 +339,8 @@ class TextBaseLineLayoutExample extends React.Component<{}, mixed> { {marker} + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {'Multi-line interleaved and :'} @@ -350,6 +358,8 @@ class TextBaseLineLayoutExample extends React.Component<{}, mixed> { + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {'Multi-line alignment'} @@ -367,6 +377,8 @@ class TextBaseLineLayoutExample extends React.Component<{}, mixed> { + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {':'} {marker} @@ -374,6 +386,8 @@ class TextBaseLineLayoutExample extends React.Component<{}, mixed> { {marker} + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} {':'} {marker} @@ -1493,6 +1507,8 @@ const examples = [ sizes change relative to each other. + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} With `dynamicTypeRamp`: Large Title @@ -1529,6 +1545,8 @@ const examples = [ + {/* $FlowFixMe[incompatible-type] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */} Without `dynamicTypeRamp`: Large Title Title diff --git a/scripts/build-types/index.js b/scripts/build-types/index.js index fa366ce62d0..fedbc401cf8 100644 --- a/scripts/build-types/index.js +++ b/scripts/build-types/index.js @@ -25,6 +25,8 @@ const config = { async function main() { const { values: {debug: debugEnabled, help}, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ } = parseArgs(config); if (help) { diff --git a/scripts/build-types/prepare-flow-api-translator.js b/scripts/build-types/prepare-flow-api-translator.js index a5bf166c040..7872eb4bce1 100644 --- a/scripts/build-types/prepare-flow-api-translator.js +++ b/scripts/build-types/prepare-flow-api-translator.js @@ -51,6 +51,8 @@ const config = { async function main() { const { values: {debug: debugEnabled, help}, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ } = parseArgs(config); if (help) { diff --git a/scripts/build/build.js b/scripts/build/build.js index a1068a3a9a4..af793c9e22c 100644 --- a/scripts/build/build.js +++ b/scripts/build/build.js @@ -45,6 +45,8 @@ async function build() { const { positionals: packageNames, values: {check, help}, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ } = parseArgs(config); if (help) { @@ -175,6 +177,8 @@ async function buildFile( // Transform source file using Babel const transformed = prettier.format( (await babel.transformFileAsync(file, getBabelConfig(packageName))).code, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ prettierConfig, ); await fs.writeFile(buildPath, transformed); diff --git a/scripts/build/clean.js b/scripts/build/clean.js index e27a7f6084f..a51413a3659 100644 --- a/scripts/build/clean.js +++ b/scripts/build/clean.js @@ -25,6 +25,8 @@ const config = { function clean() { const { values: {help}, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ } = parseArgs(config); if (help) { diff --git a/scripts/debugger-frontend/sync-and-build.js b/scripts/debugger-frontend/sync-and-build.js index c8097c55324..1ab89752781 100644 --- a/scripts/debugger-frontend/sync-and-build.js +++ b/scripts/debugger-frontend/sync-and-build.js @@ -61,6 +61,8 @@ async function main() { 'keep-scratch': keepScratch, 'create-diff': createDiff, }, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ } = parseArgs(config); if (help === true) { diff --git a/scripts/e2e/init-project-e2e.js b/scripts/e2e/init-project-e2e.js index 1be09f17c60..8dc970b929c 100644 --- a/scripts/e2e/init-project-e2e.js +++ b/scripts/e2e/init-project-e2e.js @@ -42,6 +42,8 @@ const config = { async function main() { const { values: {help, ...options}, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ } = parseArgs(config); if (help) { diff --git a/scripts/releases-ci/publish-updated-packages.js b/scripts/releases-ci/publish-updated-packages.js index 44dcb52b0cd..dbc8c161841 100644 --- a/scripts/releases-ci/publish-updated-packages.js +++ b/scripts/releases-ci/publish-updated-packages.js @@ -25,6 +25,8 @@ const config = { async function main() { const { values: {help}, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ } = parseArgs(config); if (help) { diff --git a/scripts/releases/set-rn-artifacts-version.js b/scripts/releases/set-rn-artifacts-version.js index 9857318b9c3..5931b7c45fc 100755 --- a/scripts/releases/set-rn-artifacts-version.js +++ b/scripts/releases/set-rn-artifacts-version.js @@ -45,6 +45,8 @@ const config = { async function main() { const { values: {help, 'build-type': buildType, 'to-version': toVersion}, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ } = parseArgs(config); if (help) { diff --git a/scripts/releases/set-version.js b/scripts/releases/set-version.js index 41817257329..c9038fa1c60 100644 --- a/scripts/releases/set-version.js +++ b/scripts/releases/set-version.js @@ -36,6 +36,8 @@ async function main() { const { positionals: [version], values: {help, skipReactNativeVersion}, + /* $FlowFixMe[incompatible-call] Natural Inference rollout. See + * https://fburl.com/workplace/6291gfvu */ } = parseArgs(config); if (help) {