From 7211366c48f50cd3c47fb55aa2cf7ecac5a86d11 Mon Sep 17 00:00:00 2001 From: Mike Vitousek Date: Thu, 3 Nov 2022 21:40:00 -0700 Subject: [PATCH] Pre-suppress errors in xplat ahead of the v0.192 release Summary: Adds needed suppressions ahead of the release of Flow 0.192 drop-conflicts Changelog: [internal] Reviewed By: SamChou19815 Differential Revision: D41011869 fbshipit-source-id: 3922eb4463006da5b0bec803051136e8351f68fa --- Libraries/BatchedBridge/MessageQueue.js | 1 + Libraries/Inspector/ElementBox.js | 2 ++ Libraries/Lists/VirtualizedSectionList.js | 1 + packages/rn-tester/js/utils/RNTesterList.ios.js | 1 + 4 files changed, 5 insertions(+) diff --git a/Libraries/BatchedBridge/MessageQueue.js b/Libraries/BatchedBridge/MessageQueue.js index a9810bc6f94..24e00b0a029 100644 --- a/Libraries/BatchedBridge/MessageQueue.js +++ b/Libraries/BatchedBridge/MessageQueue.js @@ -381,6 +381,7 @@ class MessageQueue { return ( // $FlowFixMe[cannot-resolve-name] typeof DebuggerInternal !== 'undefined' && + // $FlowFixMe[cannot-resolve-name] DebuggerInternal.shouldPauseOnThrow === true ); } diff --git a/Libraries/Inspector/ElementBox.js b/Libraries/Inspector/ElementBox.js index f5064cb40ae..e615d33807c 100644 --- a/Libraries/Inspector/ElementBox.js +++ b/Libraries/Inspector/ElementBox.js @@ -123,12 +123,14 @@ function resolveSizeInPlace( ) { if (style[direction] !== null && typeof style[direction] === 'string') { if (style[direction].indexOf('%') !== -1) { + // $FlowFixMe[prop-missing] style[direction] = (parseFloat(style[direction]) / 100.0) * Dimensions.get('window')[dimension]; } if (style[direction] === 'auto') { // Ignore auto sizing in frame drawing due to complexity of correctly rendering this + // $FlowFixMe[prop-missing] style[direction] = 0; } } diff --git a/Libraries/Lists/VirtualizedSectionList.js b/Libraries/Lists/VirtualizedSectionList.js index 6d9aecdc432..b1b3f8f4470 100644 --- a/Libraries/Lists/VirtualizedSectionList.js +++ b/Libraries/Lists/VirtualizedSectionList.js @@ -416,6 +416,7 @@ class VirtualizedSectionList< if (updateHighlightFn != null) { this._updateHighlightMap[cellKey] = updateHighlightFn; } else { + // $FlowFixMe[prop-missing] delete this._updateHighlightFor[cellKey]; } }; diff --git a/packages/rn-tester/js/utils/RNTesterList.ios.js b/packages/rn-tester/js/utils/RNTesterList.ios.js index cb0e34893de..61db89b0b4b 100644 --- a/packages/rn-tester/js/utils/RNTesterList.ios.js +++ b/packages/rn-tester/js/utils/RNTesterList.ios.js @@ -339,6 +339,7 @@ if (ReactNativeFeatureFlags.shouldEmitW3CPointerEvents()) { const Modules: {...} = {}; APIs.concat(Components).forEach(Example => { + // $FlowFixMe[prop-missing] Modules[Example.key] = Example.module; });