Skip to content

Commit 68650ba

Browse files
marcoww6facebook-github-bot
authored andcommitted
Pre-suppress errors for null_void for xplat js (#52480)
Summary: Changelog: [Internal] Pull Request resolved: #52480 Reviewed By: SamChou19815 Differential Revision: D77890434 fbshipit-source-id: cc0571e0ff1c7cec3fff8614f688d46e46970cc4
1 parent 5ec8e60 commit 68650ba

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

packages/react-native/Libraries/StyleSheet/processAspectRatio.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ function processAspectRatio(aspectRatio?: number | string): ?number {
1919
if (typeof aspectRatio !== 'string') {
2020
if (__DEV__) {
2121
invariant(
22+
/* $FlowFixMe[constant-condition] Error discovered during Constant
23+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
2224
!aspectRatio,
2325
'aspectRatio must either be a number, a ratio string or `auto`. You passed: %s',
2426
aspectRatio,

packages/rn-tester/js/examples/Touchable/TouchableExample.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,9 @@ function TouchableOnFocus() {
572572
const toggleFocus = () => {
573573
isFocused
574574
? setFocusStatus('This touchable is focused')
575-
: setIsFocused('This touchable is not focused') &&
575+
: /* $FlowFixMe[constant-condition] Error discovered during Constant
576+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
577+
setIsFocused('This touchable is not focused') &&
576578
setIsBlurred('This item has lost focus, onBlur called');
577579
};
578580
const focusTouchable = () => {

packages/rn-tester/js/examples/TurboModule/SampleLegacyModuleExample.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,14 @@ function getSampleLegacyModule() {
5252
function stringify(obj: mixed): string {
5353
function replacer(_: string, value: mixed) {
5454
if (value instanceof Object && !(value instanceof Array)) {
55+
/* $FlowFixMe[constant-condition] Error discovered during Constant
56+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
5557
return Object.keys(value ?? {})
5658
.sort()
5759
.reduce((sorted: {[key: string]: mixed}, key: string) => {
5860
// $FlowFixMe[invalid-computed-prop]
61+
/* $FlowFixMe[constant-condition] Error discovered during Constant
62+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
5963
sorted[key] = (value ?? {})[key];
6064
return sorted;
6165
}, {});

0 commit comments

Comments
 (0)