Skip to content

Commit ea04a48

Browse files
authored
Flow: remove unused suppressions (#25424)
Removes $FlowFixMe's that are no longer needed. Used flow/tool from the Flow repo: ``` ~/Developer/flow/tool update-suppressions . ```
1 parent 9813ede commit ea04a48

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+11
-113
lines changed

packages/react-cache/src/ReactCacheOld.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ function accessResult<I, K, V>(
122122
);
123123
const newResult: PendingResult = {
124124
status: Pending,
125-
// $FlowFixMe[method-unbinding]
126125
value: thenable,
127126
};
128127
// $FlowFixMe[escaped-generic] discovered when updating Flow

packages/react-client/src/ReactFlightClient.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ function initializeModelChunk<T>(chunk: ResolvedModelChunk<T>): void {
321321
initializingChunkBlockedModel !== null &&
322322
initializingChunkBlockedModel.deps > 0
323323
) {
324-
// $FlowFixMe[incompatible-type]: found when upgrading Flow
325324
initializingChunkBlockedModel.value = value;
326325
// We discovered new dependencies on modules that are not yet resolved.
327326
// We have to go the BLOCKED state until they're resolved.

packages/react-devtools-shared/src/backend/NativeStyleEditor/setupNativeStyleEditor.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ function measureStyle(
129129
return;
130130
}
131131

132-
// $FlowFixMe the parameter types of an unknown function are unknown
133132
instance.measure((x, y, width, height, left, top) => {
134133
// RN Android sometimes returns undefined here. Don't send measurements in this case.
135134
// https://github.com/jhen0409/react-native-debugger/issues/84#issuecomment-304611817

packages/react-devtools-shared/src/backend/console.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ export function patch({
181181
unpatchFn = () => {
182182
for (const method in originalConsoleMethods) {
183183
try {
184-
// $FlowFixMe property error|warn is not writable.
185184
targetConsole[method] = originalConsoleMethods[method];
186185
} catch (error) {}
187186
}
@@ -279,7 +278,6 @@ export function patch({
279278
overrideMethod.__REACT_DEVTOOLS_ORIGINAL_METHOD__ = originalMethod;
280279
originalMethod.__REACT_DEVTOOLS_OVERRIDE_METHOD__ = overrideMethod;
281280

282-
// $FlowFixMe property error|warn is not writable.
283281
targetConsole[method] = overrideMethod;
284282
} catch (error) {}
285283
});
@@ -321,7 +319,6 @@ export function patchForStrictMode() {
321319
unpatchForStrictModeFn = () => {
322320
for (const method in originalConsoleMethods) {
323321
try {
324-
// $FlowFixMe property error|warn is not writable.
325322
targetConsole[method] = originalConsoleMethods[method];
326323
} catch (error) {}
327324
}
@@ -355,7 +352,6 @@ export function patchForStrictMode() {
355352
overrideMethod.__REACT_DEVTOOLS_STRICT_MODE_ORIGINAL_METHOD__ = originalMethod;
356353
originalMethod.__REACT_DEVTOOLS_STRICT_MODE_OVERRIDE_METHOD__ = overrideMethod;
357354

358-
// $FlowFixMe property error|warn is not writable.
359355
targetConsole[method] = overrideMethod;
360356
} catch (error) {}
361357
});

packages/react-devtools-shared/src/backend/profilingHooks.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ let supportsUserTimingV3 = false;
5353
if (supportsUserTiming) {
5454
const CHECK_V3_MARK = '__v3';
5555
const markOptions = {};
56-
// $FlowFixMe: Ignore Flow complaining about needing a value
5756
Object.defineProperty(markOptions, 'startTime', {
5857
get: function() {
5958
supportsUserTimingV3 = true;

packages/react-devtools-shared/src/backend/renderer.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ export function getInternalReactConstants(
387387
const symbolOrNumber =
388388
typeof type === 'object' && type !== null ? type.$$typeof : type;
389389

390-
// $FlowFixMe Flow doesn't know about typeof "symbol"
391390
return typeof symbolOrNumber === 'symbol'
392391
? // $FlowFixMe `toString()` doesn't match the type signature?
393392
symbolOrNumber.toString()
@@ -3275,7 +3274,6 @@ export function attach(
32753274
for (const method in console) {
32763275
try {
32773276
originalConsoleMethods[method] = console[method];
3278-
// $FlowFixMe property error|warn is not writable.
32793277
console[method] = () => {};
32803278
} catch (error) {}
32813279
}
@@ -3290,7 +3288,6 @@ export function attach(
32903288
// Restore original console functionality.
32913289
for (const method in originalConsoleMethods) {
32923290
try {
3293-
// $FlowFixMe property error|warn is not writable.
32943291
console[method] = originalConsoleMethods[method];
32953292
} catch (error) {}
32963293
}
@@ -3713,7 +3710,6 @@ export function attach(
37133710
id,
37143711
responseID: requestID,
37153712
type: 'full-data',
3716-
// $FlowFixMe[incompatible-return] found when upgrading Flow
37173713
// $FlowFixMe[prop-missing] found when upgrading Flow
37183714
value: cleanedInspectedElement,
37193715
};

packages/react-devtools-shared/src/backend/views/Highlighter/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ export default function setupHighlighter(
119119
if (scrollIntoView && typeof node.scrollIntoView === 'function') {
120120
// If the node isn't visible show it before highlighting it.
121121
// We may want to reconsider this; it might be a little disruptive.
122-
// $FlowFixMe Flow only knows about 'start' | 'end'
123122
node.scrollIntoView({block: 'nearest', inline: 'nearest'});
124123
}
125124

packages/react-devtools-shared/src/devtools/cache.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ function accessResult<Input, Key, Value>(
128128
);
129129
const newResult: PendingResult = {
130130
status: Pending,
131-
// $FlowFixMe[method-unbinding]
132131
value: thenable,
133132
};
134133
entriesForResource.set(key, newResult);

packages/react-devtools-shared/src/devtools/views/Components/InspectedElementHooksTree.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ export function InnerHooksTreeView({
138138
inspectedElement,
139139
path,
140140
}: InnerHooksTreeViewProps): React.Node {
141-
// $FlowFixMe "Missing type annotation for U" whatever that means
142141
return hooks.map((hook, index) => (
143142
<HookView
144143
key={index}
@@ -356,7 +355,6 @@ function HookView({
356355
className={name !== '' ? styles.Name : styles.NameAnonymous}>
357356
{hookDisplayName || 'Anonymous'}
358357
</span>{' '}
359-
{/* $FlowFixMe */}
360358
<span className={styles.Value} onClick={toggleIsOpen}>
361359
{displayValue}
362360
</span>

packages/react-devtools-shared/src/devtools/views/Components/Tree.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ export default function Tree(props: Props): React.Node {
409409
tabIndex={0}>
410410
<AutoSizer>
411411
{({height, width}) => (
412-
// $FlowFixMe https://github.com/facebook/flow/issues/7341
413412
<FixedSizeList
414413
className={styles.List}
415414
height={height}

0 commit comments

Comments
 (0)