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.
This commit is contained in:
Jan Kassens 2023-01-10 10:32:42 -05:00 committed by GitHub
parent afe6521e13
commit c49131669b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 4 additions and 30 deletions

View File

@ -125,7 +125,6 @@ function accessResult<I, K, V>(
status: Pending,
value: thenable,
};
// $FlowFixMe[escaped-generic] discovered when updating Flow
const newEntry = lru.add(newResult, deleteEntry.bind(null, resource, key));
entriesForResource.set(key, newEntry);
return newResult;

View File

@ -148,7 +148,6 @@ export function connectToDevTools(options: ?ConnectOptions) {
}
},
});
// $FlowFixMe[incompatible-use] found when upgrading Flow
bridge.addListener(
'updateComponentFilters',
(componentFilters: Array<ComponentFilter>) => {

View File

@ -81,7 +81,6 @@ export function activate(
bridge,
}: {
bridge?: BackendBridge,
// $FlowFixMe[incompatible-exact]
} = {},
): void {
if (bridge == null) {

View File

@ -63,7 +63,6 @@ export function initialize(
}: {
bridge?: FrontendBridge,
store?: Store,
// $FlowFixMe[incompatible-exact]
} = {},
): React.AbstractComponent<Props, mixed> {
if (bridge == null) {

View File

@ -151,7 +151,6 @@ export function serializeToString(data: any): string {
}
cache.add(value);
}
// $FlowFixMe
if (typeof value === 'bigint') {
return value.toString() + 'n';
}

View File

@ -17,7 +17,6 @@ function wrapWithHoc(Component: () => any, index: number) {
const displayName = (Component: any).displayName || Component.name;
// $FlowFixMe[incompatible-type] found when upgrading Flow
HOC.displayName = `withHoc${index}(${displayName})`;
return HOC;
}

View File

@ -31,7 +31,6 @@ const immutable = Immutable.fromJS({
xyz: 1,
},
});
// $FlowFixMe
const bigInt = BigInt(123); // eslint-disable-line no-undef
export default function UnserializableProps(): React.Node {

View File

@ -201,7 +201,6 @@ function getRootNode(container: Container): FloatRoot {
function getCurrentResourceRoot(): null | FloatRoot {
const currentContainer = getCurrentRootHostContainer();
// $FlowFixMe flow should know currentContainer is a Node and has getRootNode
return currentContainer ? getRootNode(currentContainer) : null;
}

View File

@ -782,11 +782,9 @@ export function resourcesFromLink(props: Props): boolean {
if (__DEV__) {
validateLinkPropsForStyleResource(props);
}
// $FlowFixMe[incompatible-use] found when upgrading Flow
let preloadResource = resources.preloadsMap.get(href);
if (!preloadResource) {
preloadResource = createPreloadResource(
// $FlowFixMe[incompatible-call] found when upgrading Flow
resources,
href,
'style',
@ -937,7 +935,6 @@ export function resourcesFromScript(props: Props): boolean {
let preloadResource = resources.preloadsMap.get(src);
if (!preloadResource) {
preloadResource = createPreloadResource(
// $FlowFixMe[incompatible-call] found when upgrading Flow
resources,
src,
'script',

View File

@ -599,7 +599,6 @@ function updateSimpleMemoComponent(
try {
outerMemoType = init(payload);
} catch (x) {
// $FlowFixMe[incompatible-type] found when upgrading Flow
outerMemoType = null;
}
// Inner propTypes will be validated in the function component path.

View File

@ -2391,12 +2391,9 @@ function getRetryCache(finishedWork: Fiber) {
}
case OffscreenComponent: {
const instance: OffscreenInstance = finishedWork.stateNode;
// $FlowFixMe[incompatible-type-arg] found when upgrading Flow
let retryCache: null | Set<Wakeable> | WeakSet<Wakeable> =
// $FlowFixMe[incompatible-type] found when upgrading Flow
instance._retryCache;
if (retryCache === null) {
// $FlowFixMe[incompatible-type]
retryCache = instance._retryCache = new PossiblyWeakSet();
}
return retryCache;

View File

@ -24,7 +24,6 @@ if (__DEV__) {
warnedAboutMissingGetChildContext = ({}: {[string]: boolean});
}
// $FlowFixMe[incompatible-exact]
export const emptyContextObject: {} = {};
if (__DEV__) {
Object.freeze(emptyContextObject);

View File

@ -2806,7 +2806,6 @@ const HooksDispatcherOnMount: Dispatcher = {
useId: mountId,
};
if (enableCache) {
// $FlowFixMe[escaped-generic] discovered when updating Flow
(HooksDispatcherOnMount: Dispatcher).useCacheRefresh = mountRefresh;
}
if (enableUseHook) {

View File

@ -54,7 +54,6 @@ export type OffscreenInstance = {
_visibility: OffscreenVisibility,
_pendingMarkers: Set<TracingMarkerInstance> | null,
_transitions: Set<Transition> | null,
// $FlowFixMe[incompatible-type-arg] found when upgrading Flow
_retryCache: WeakSet<Wakeable> | Set<Wakeable> | null,
// Represents the current Offscreen fiber

View File

@ -1813,7 +1813,6 @@ function handleThrow(root: FiberRoot, thrownValue: any): void {
const isWakeable =
thrownValue !== null &&
typeof thrownValue === 'object' &&
// $FlowFixMe[method-unbinding]
typeof thrownValue.then === 'function';
workInProgressSuspendedReason = isWakeable
@ -3458,7 +3457,6 @@ export function resolveRetryWakeable(boundaryFiber: Fiber, wakeable: Wakeable) {
break;
case OffscreenComponent: {
const instance: OffscreenInstance = boundaryFiber.stateNode;
// $FlowFixMe[incompatible-type] found when upgrading Flow
retryCache = instance._retryCache;
break;
}

View File

@ -50,8 +50,9 @@ const allFamiliesByID: Map<string, Family> = new Map();
const allFamiliesByType:
| WeakMap<any, Family>
| Map<any, Family> = new PossiblyWeakMap();
const allSignaturesByType: // $FlowFixMe
WeakMap<any, Signature> | Map<any, Signature> = new PossiblyWeakMap();
const allSignaturesByType:
| WeakMap<any, Signature>
| Map<any, Signature> = new PossiblyWeakMap();
// This WeakMap is read by React, so we only put families
// that have actually been edited here. This keeps checks fast.
const updatedFamiliesByType:

View File

@ -17,7 +17,6 @@ if (__DEV__) {
warnedAboutMissingGetChildContext = ({}: {[string]: boolean});
}
// $FlowFixMe[incompatible-exact]
export const emptyContextObject: {} = {};
if (__DEV__) {
Object.freeze(emptyContextObject);

View File

@ -36,7 +36,6 @@ export const DefaultCacheDispatcher: CacheDispatcher = {
let entry: AbortSignal | void = (cache.get(createSignal): any);
if (entry === undefined) {
entry = createSignal();
// $FlowFixMe[incompatible-use] found when upgrading Flow
cache.set(createSignal, entry);
}
return entry;
@ -47,7 +46,6 @@ export const DefaultCacheDispatcher: CacheDispatcher = {
if (entry === undefined) {
entry = resourceType();
// TODO: Warn if undefined?
// $FlowFixMe[incompatible-use] found when upgrading Flow
cache.set(resourceType, entry);
}
return entry;

View File

@ -1006,7 +1006,6 @@ export function resolveModelToJSON(
return serializeByValueID(symbolId);
}
// $FlowFixMe: bigint isn't added to Flow yet.
if (typeof value === 'bigint') {
throw new Error(
`BigInt (${value}) is not yet supported in Client Component props.` +

View File

@ -71,7 +71,6 @@ export function clonePrecomputedChunk(
}
export function closeWithError(destination: Destination, error: mixed): void {
// $FlowFixMe[method-unbinding]
if (typeof destination.error === 'function') {
// $FlowFixMe: This is an Error object or the destination accepts other types.
destination.error(error);

View File

@ -11,9 +11,7 @@ const ReactDebugCurrentFrame: {
setExtraStackFrame?: (stack: null | string) => void,
getCurrentStack?: null | (() => string),
getStackAddendum?: () => string,
} =
// $FlowFixMe[incompatible-exact]
{};
} = {};
let currentExtraStackFrame = (null: null | string);