Skip to content

Commit c491316

Browse files
authored
Remove unused Flow suppressions (#25977)
These suppressions are no longer required. Generated using: ```sh flow/tool update-suppressions . ``` followed by adding back 1 or 2 suppressions that were only triggered in some configurations.
1 parent afe6521 commit c491316

File tree

21 files changed

+4
-30
lines changed

21 files changed

+4
-30
lines changed

packages/react-cache/src/ReactCacheOld.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ function accessResult<I, K, V>(
125125
status: Pending,
126126
value: thenable,
127127
};
128-
// $FlowFixMe[escaped-generic] discovered when updating Flow
129128
const newEntry = lru.add(newResult, deleteEntry.bind(null, resource, key));
130129
entriesForResource.set(key, newEntry);
131130
return newResult;

packages/react-devtools-core/src/backend.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ export function connectToDevTools(options: ?ConnectOptions) {
148148
}
149149
},
150150
});
151-
// $FlowFixMe[incompatible-use] found when upgrading Flow
152151
bridge.addListener(
153152
'updateComponentFilters',
154153
(componentFilters: Array<ComponentFilter>) => {

packages/react-devtools-inline/src/backend.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ export function activate(
8181
bridge,
8282
}: {
8383
bridge?: BackendBridge,
84-
// $FlowFixMe[incompatible-exact]
8584
} = {},
8685
): void {
8786
if (bridge == null) {

packages/react-devtools-inline/src/frontend.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export function initialize(
6363
}: {
6464
bridge?: FrontendBridge,
6565
store?: Store,
66-
// $FlowFixMe[incompatible-exact]
6766
} = {},
6867
): React.AbstractComponent<Props, mixed> {
6968
if (bridge == null) {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ export function serializeToString(data: any): string {
151151
}
152152
cache.add(value);
153153
}
154-
// $FlowFixMe
155154
if (typeof value === 'bigint') {
156155
return value.toString() + 'n';
157156
}

packages/react-devtools-shell/src/app/DeeplyNestedComponents/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ function wrapWithHoc(Component: () => any, index: number) {
1717

1818
const displayName = (Component: any).displayName || Component.name;
1919

20-
// $FlowFixMe[incompatible-type] found when upgrading Flow
2120
HOC.displayName = `withHoc${index}(${displayName})`;
2221
return HOC;
2322
}

packages/react-devtools-shell/src/app/InspectableElements/UnserializableProps.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ const immutable = Immutable.fromJS({
3131
xyz: 1,
3232
},
3333
});
34-
// $FlowFixMe
3534
const bigInt = BigInt(123); // eslint-disable-line no-undef
3635

3736
export default function UnserializableProps(): React.Node {

packages/react-dom-bindings/src/client/ReactDOMFloatClient.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ function getRootNode(container: Container): FloatRoot {
201201

202202
function getCurrentResourceRoot(): null | FloatRoot {
203203
const currentContainer = getCurrentRootHostContainer();
204-
// $FlowFixMe flow should know currentContainer is a Node and has getRootNode
205204
return currentContainer ? getRootNode(currentContainer) : null;
206205
}
207206

packages/react-dom-bindings/src/server/ReactDOMFloatServer.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -782,11 +782,9 @@ export function resourcesFromLink(props: Props): boolean {
782782
if (__DEV__) {
783783
validateLinkPropsForStyleResource(props);
784784
}
785-
// $FlowFixMe[incompatible-use] found when upgrading Flow
786785
let preloadResource = resources.preloadsMap.get(href);
787786
if (!preloadResource) {
788787
preloadResource = createPreloadResource(
789-
// $FlowFixMe[incompatible-call] found when upgrading Flow
790788
resources,
791789
href,
792790
'style',
@@ -937,7 +935,6 @@ export function resourcesFromScript(props: Props): boolean {
937935
let preloadResource = resources.preloadsMap.get(src);
938936
if (!preloadResource) {
939937
preloadResource = createPreloadResource(
940-
// $FlowFixMe[incompatible-call] found when upgrading Flow
941938
resources,
942939
src,
943940
'script',

packages/react-reconciler/src/ReactFiberBeginWork.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,6 @@ function updateSimpleMemoComponent(
599599
try {
600600
outerMemoType = init(payload);
601601
} catch (x) {
602-
// $FlowFixMe[incompatible-type] found when upgrading Flow
603602
outerMemoType = null;
604603
}
605604
// Inner propTypes will be validated in the function component path.

packages/react-reconciler/src/ReactFiberCommitWork.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,12 +2391,9 @@ function getRetryCache(finishedWork: Fiber) {
23912391
}
23922392
case OffscreenComponent: {
23932393
const instance: OffscreenInstance = finishedWork.stateNode;
2394-
// $FlowFixMe[incompatible-type-arg] found when upgrading Flow
23952394
let retryCache: null | Set<Wakeable> | WeakSet<Wakeable> =
2396-
// $FlowFixMe[incompatible-type] found when upgrading Flow
23972395
instance._retryCache;
23982396
if (retryCache === null) {
2399-
// $FlowFixMe[incompatible-type]
24002397
retryCache = instance._retryCache = new PossiblyWeakSet();
24012398
}
24022399
return retryCache;

packages/react-reconciler/src/ReactFiberContext.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ if (__DEV__) {
2424
warnedAboutMissingGetChildContext = ({}: {[string]: boolean});
2525
}
2626

27-
// $FlowFixMe[incompatible-exact]
2827
export const emptyContextObject: {} = {};
2928
if (__DEV__) {
3029
Object.freeze(emptyContextObject);

packages/react-reconciler/src/ReactFiberHooks.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2806,7 +2806,6 @@ const HooksDispatcherOnMount: Dispatcher = {
28062806
useId: mountId,
28072807
};
28082808
if (enableCache) {
2809-
// $FlowFixMe[escaped-generic] discovered when updating Flow
28102809
(HooksDispatcherOnMount: Dispatcher).useCacheRefresh = mountRefresh;
28112810
}
28122811
if (enableUseHook) {

packages/react-reconciler/src/ReactFiberOffscreenComponent.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export type OffscreenInstance = {
5454
_visibility: OffscreenVisibility,
5555
_pendingMarkers: Set<TracingMarkerInstance> | null,
5656
_transitions: Set<Transition> | null,
57-
// $FlowFixMe[incompatible-type-arg] found when upgrading Flow
5857
_retryCache: WeakSet<Wakeable> | Set<Wakeable> | null,
5958

6059
// Represents the current Offscreen fiber

packages/react-reconciler/src/ReactFiberWorkLoop.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,6 @@ function handleThrow(root: FiberRoot, thrownValue: any): void {
18131813
const isWakeable =
18141814
thrownValue !== null &&
18151815
typeof thrownValue === 'object' &&
1816-
// $FlowFixMe[method-unbinding]
18171816
typeof thrownValue.then === 'function';
18181817

18191818
workInProgressSuspendedReason = isWakeable
@@ -3458,7 +3457,6 @@ export function resolveRetryWakeable(boundaryFiber: Fiber, wakeable: Wakeable) {
34583457
break;
34593458
case OffscreenComponent: {
34603459
const instance: OffscreenInstance = boundaryFiber.stateNode;
3461-
// $FlowFixMe[incompatible-type] found when upgrading Flow
34623460
retryCache = instance._retryCache;
34633461
break;
34643462
}

packages/react-refresh/src/ReactFreshRuntime.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ const allFamiliesByID: Map<string, Family> = new Map();
5050
const allFamiliesByType:
5151
| WeakMap<any, Family>
5252
| Map<any, Family> = new PossiblyWeakMap();
53-
const allSignaturesByType: // $FlowFixMe
54-
WeakMap<any, Signature> | Map<any, Signature> = new PossiblyWeakMap();
53+
const allSignaturesByType:
54+
| WeakMap<any, Signature>
55+
| Map<any, Signature> = new PossiblyWeakMap();
5556
// This WeakMap is read by React, so we only put families
5657
// that have actually been edited here. This keeps checks fast.
5758
const updatedFamiliesByType:

packages/react-server/src/ReactFizzContext.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ if (__DEV__) {
1717
warnedAboutMissingGetChildContext = ({}: {[string]: boolean});
1818
}
1919

20-
// $FlowFixMe[incompatible-exact]
2120
export const emptyContextObject: {} = {};
2221
if (__DEV__) {
2322
Object.freeze(emptyContextObject);

packages/react-server/src/ReactFlightCache.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export const DefaultCacheDispatcher: CacheDispatcher = {
3636
let entry: AbortSignal | void = (cache.get(createSignal): any);
3737
if (entry === undefined) {
3838
entry = createSignal();
39-
// $FlowFixMe[incompatible-use] found when upgrading Flow
4039
cache.set(createSignal, entry);
4140
}
4241
return entry;
@@ -47,7 +46,6 @@ export const DefaultCacheDispatcher: CacheDispatcher = {
4746
if (entry === undefined) {
4847
entry = resourceType();
4948
// TODO: Warn if undefined?
50-
// $FlowFixMe[incompatible-use] found when upgrading Flow
5149
cache.set(resourceType, entry);
5250
}
5351
return entry;

packages/react-server/src/ReactFlightServer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,6 @@ export function resolveModelToJSON(
10061006
return serializeByValueID(symbolId);
10071007
}
10081008

1009-
// $FlowFixMe: bigint isn't added to Flow yet.
10101009
if (typeof value === 'bigint') {
10111010
throw new Error(
10121011
`BigInt (${value}) is not yet supported in Client Component props.` +

packages/react-server/src/ReactServerStreamConfigBun.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ export function clonePrecomputedChunk(
7171
}
7272

7373
export function closeWithError(destination: Destination, error: mixed): void {
74-
// $FlowFixMe[method-unbinding]
7574
if (typeof destination.error === 'function') {
7675
// $FlowFixMe: This is an Error object or the destination accepts other types.
7776
destination.error(error);

packages/react/src/ReactDebugCurrentFrame.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ const ReactDebugCurrentFrame: {
1111
setExtraStackFrame?: (stack: null | string) => void,
1212
getCurrentStack?: null | (() => string),
1313
getStackAddendum?: () => string,
14-
} =
15-
// $FlowFixMe[incompatible-exact]
16-
{};
14+
} = {};
1715

1816
let currentExtraStackFrame = (null: null | string);
1917

0 commit comments

Comments
 (0)