@samitouri / QOS-React-2 / commits / c49131669b

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.

Jan Kassens committed Jan 10, 2023 at 10:32 UTC c49131669ba23500b8b071a5ca6ef189a28aa83e
21 files changed +4 -30
packages/react-cache/src/ReactCacheOld.js
-1
@@ -125,7 +125,6 @@ function accessResult<I, K, V>(
125 status: Pending,
126 value: thenable,
127 };
128 - // $FlowFixMe[escaped-generic] discovered when updating Flow
128 const newEntry = lru.add(newResult, deleteEntry.bind(null, resource, key));
129 entriesForResource.set(key, newEntry);
130 return newResult;
packages/react-devtools-core/src/backend.js
-1
@@ -148,7 +148,6 @@ export function connectToDevTools(options: ?ConnectOptions) {
148 }
149 },
150 });
151 - // $FlowFixMe[incompatible-use] found when upgrading Flow
151 bridge.addListener(
152 'updateComponentFilters',
153 (componentFilters: Array<ComponentFilter>) => {
packages/react-devtools-inline/src/backend.js
-1
@@ -81,7 +81,6 @@ export function activate(
81 bridge,
82 }: {
83 bridge?: BackendBridge,
84 - // $FlowFixMe[incompatible-exact]
84 } = {},
85 ): void {
86 if (bridge == null) {
packages/react-devtools-inline/src/frontend.js
-1
@@ -63,7 +63,6 @@ export function initialize(
63 }: {
64 bridge?: FrontendBridge,
65 store?: Store,
66 - // $FlowFixMe[incompatible-exact]
66 } = {},
67 ): React.AbstractComponent<Props, mixed> {
68 if (bridge == null) {
packages/react-devtools-shared/src/backend/utils.js
-1
@@ -151,7 +151,6 @@ export function serializeToString(data: any): string {
151 }
152 cache.add(value);
153 }
154 - // $FlowFixMe
154 if (typeof value === 'bigint') {
155 return value.toString() + 'n';
156 }
packages/react-devtools-shell/src/app/DeeplyNestedComponents/index.js
-1
@@ -17,7 +17,6 @@ function wrapWithHoc(Component: () => any, index: number) {
17
18 const displayName = (Component: any).displayName || Component.name;
19
20 - // $FlowFixMe[incompatible-type] found when upgrading Flow
20 HOC.displayName = `withHoc${index}(${displayName})`;
21 return HOC;
22 }
packages/react-devtools-shell/src/app/InspectableElements/UnserializableProps.js
-1
@@ -31,7 +31,6 @@ const immutable = Immutable.fromJS({
31 xyz: 1,
32 },
33 });
34 -// $FlowFixMe
34 const bigInt = BigInt(123); // eslint-disable-line no-undef
35
36 export default function UnserializableProps(): React.Node {
packages/react-dom-bindings/src/client/ReactDOMFloatClient.js
-1
@@ -201,7 +201,6 @@ function getRootNode(container: Container): FloatRoot {
201
202 function getCurrentResourceRoot(): null | FloatRoot {
203 const currentContainer = getCurrentRootHostContainer();
204 - // $FlowFixMe flow should know currentContainer is a Node and has getRootNode
204 return currentContainer ? getRootNode(currentContainer) : null;
205 }
206
packages/react-dom-bindings/src/server/ReactDOMFloatServer.js
-3
@@ -782,11 +782,9 @@ export function resourcesFromLink(props: Props): boolean {
782 if (__DEV__) {
783 validateLinkPropsForStyleResource(props);
784 }
785 - // $FlowFixMe[incompatible-use] found when upgrading Flow
785 let preloadResource = resources.preloadsMap.get(href);
786 if (!preloadResource) {
787 preloadResource = createPreloadResource(
789 - // $FlowFixMe[incompatible-call] found when upgrading Flow
788 resources,
789 href,
790 'style',
@@ -937,7 +935,6 @@ export function resourcesFromScript(props: Props): boolean {
935 let preloadResource = resources.preloadsMap.get(src);
936 if (!preloadResource) {
937 preloadResource = createPreloadResource(
940 - // $FlowFixMe[incompatible-call] found when upgrading Flow
938 resources,
939 src,
940 'script',
packages/react-reconciler/src/ReactFiberBeginWork.js
-1
@@ -599,7 +599,6 @@ function updateSimpleMemoComponent(
599 try {
600 outerMemoType = init(payload);
601 } catch (x) {
602 - // $FlowFixMe[incompatible-type] found when upgrading Flow
602 outerMemoType = null;
603 }
604 // Inner propTypes will be validated in the function component path.
packages/react-reconciler/src/ReactFiberCommitWork.js
-3
@@ -2391,12 +2391,9 @@ function getRetryCache(finishedWork: Fiber) {
2391 }
2392 case OffscreenComponent: {
2393 const instance: OffscreenInstance = finishedWork.stateNode;
2394 - // $FlowFixMe[incompatible-type-arg] found when upgrading Flow
2394 let retryCache: null | Set<Wakeable> | WeakSet<Wakeable> =
2396 - // $FlowFixMe[incompatible-type] found when upgrading Flow
2395 instance._retryCache;
2396 if (retryCache === null) {
2399 - // $FlowFixMe[incompatible-type]
2397 retryCache = instance._retryCache = new PossiblyWeakSet();
2398 }
2399 return retryCache;
packages/react-reconciler/src/ReactFiberContext.js
-1
@@ -24,7 +24,6 @@ if (__DEV__) {
24 warnedAboutMissingGetChildContext = ({}: {[string]: boolean});
25 }
26
27 -// $FlowFixMe[incompatible-exact]
27 export const emptyContextObject: {} = {};
28 if (__DEV__) {
29 Object.freeze(emptyContextObject);
packages/react-reconciler/src/ReactFiberHooks.js
-1
@@ -2806,7 +2806,6 @@ const HooksDispatcherOnMount: Dispatcher = {
2806 useId: mountId,
2807 };
2808 if (enableCache) {
2809 - // $FlowFixMe[escaped-generic] discovered when updating Flow
2809 (HooksDispatcherOnMount: Dispatcher).useCacheRefresh = mountRefresh;
2810 }
2811 if (enableUseHook) {
packages/react-reconciler/src/ReactFiberOffscreenComponent.js
-1
@@ -54,7 +54,6 @@ export type OffscreenInstance = {
54 _visibility: OffscreenVisibility,
55 _pendingMarkers: Set<TracingMarkerInstance> | null,
56 _transitions: Set<Transition> | null,
57 - // $FlowFixMe[incompatible-type-arg] found when upgrading Flow
57 _retryCache: WeakSet<Wakeable> | Set<Wakeable> | null,
58
59 // Represents the current Offscreen fiber
packages/react-reconciler/src/ReactFiberWorkLoop.js
-2
@@ -1813,7 +1813,6 @@ function handleThrow(root: FiberRoot, thrownValue: any): void {
1813 const isWakeable =
1814 thrownValue !== null &&
1815 typeof thrownValue === 'object' &&
1816 - // $FlowFixMe[method-unbinding]
1816 typeof thrownValue.then === 'function';
1817
1818 workInProgressSuspendedReason = isWakeable
@@ -3458,7 +3457,6 @@ export function resolveRetryWakeable(boundaryFiber: Fiber, wakeable: Wakeable) {
3457 break;
3458 case OffscreenComponent: {
3459 const instance: OffscreenInstance = boundaryFiber.stateNode;
3461 - // $FlowFixMe[incompatible-type] found when upgrading Flow
3460 retryCache = instance._retryCache;
3461 break;
3462 }
packages/react-refresh/src/ReactFreshRuntime.js
+3 -2
@@ -50,8 +50,9 @@ const allFamiliesByID: Map<string, Family> = new Map();
50 const allFamiliesByType:
51 | WeakMap<any, Family>
52 | 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();
56 // This WeakMap is read by React, so we only put families
57 // that have actually been edited here. This keeps checks fast.
58 const updatedFamiliesByType:
packages/react-server/src/ReactFizzContext.js
-1
@@ -17,7 +17,6 @@ if (__DEV__) {
17 warnedAboutMissingGetChildContext = ({}: {[string]: boolean});
18 }
19
20 -// $FlowFixMe[incompatible-exact]
20 export const emptyContextObject: {} = {};
21 if (__DEV__) {
22 Object.freeze(emptyContextObject);
packages/react-server/src/ReactFlightCache.js
-2
@@ -36,7 +36,6 @@ export const DefaultCacheDispatcher: CacheDispatcher = {
36 let entry: AbortSignal | void = (cache.get(createSignal): any);
37 if (entry === undefined) {
38 entry = createSignal();
39 - // $FlowFixMe[incompatible-use] found when upgrading Flow
39 cache.set(createSignal, entry);
40 }
41 return entry;
@@ -47,7 +46,6 @@ export const DefaultCacheDispatcher: CacheDispatcher = {
46 if (entry === undefined) {
47 entry = resourceType();
48 // TODO: Warn if undefined?
50 - // $FlowFixMe[incompatible-use] found when upgrading Flow
49 cache.set(resourceType, entry);
50 }
51 return entry;
packages/react-server/src/ReactFlightServer.js
-1
@@ -1006,7 +1006,6 @@ export function resolveModelToJSON(
1006 return serializeByValueID(symbolId);
1007 }
1008
1009 - // $FlowFixMe: bigint isn't added to Flow yet.
1009 if (typeof value === 'bigint') {
1010 throw new Error(
1011 `BigInt (${value}) is not yet supported in Client Component props.` +
packages/react-server/src/ReactServerStreamConfigBun.js
-1
@@ -71,7 +71,6 @@ export function clonePrecomputedChunk(
71 }
72
73 export function closeWithError(destination: Destination, error: mixed): void {
74 - // $FlowFixMe[method-unbinding]
74 if (typeof destination.error === 'function') {
75 // $FlowFixMe: This is an Error object or the destination accepts other types.
76 destination.error(error);
packages/react/src/ReactDebugCurrentFrame.js
+1 -3
@@ -11,9 +11,7 @@ const ReactDebugCurrentFrame: {
11 setExtraStackFrame?: (stack: null | string) => void,
12 getCurrentStack?: null | (() => string),
13 getStackAddendum?: () => string,
14 -} =
15 - // $FlowFixMe[incompatible-exact]
16 - {};
14 +} = {};
15
16 let currentExtraStackFrame = (null: null | string);
17