diff --git a/packages/react-reconciler/src/ReactFiberClassUpdateQueue.js b/packages/react-reconciler/src/ReactFiberClassUpdateQueue.js index a6148e0184198..2e88c982022d3 100644 --- a/packages/react-reconciler/src/ReactFiberClassUpdateQueue.js +++ b/packages/react-reconciler/src/ReactFiberClassUpdateQueue.js @@ -161,7 +161,7 @@ export const CaptureUpdate = 3; let hasForceUpdate = false; let didWarnUpdateInsideUpdate; -let currentlyProcessingQueue; +let currentlyProcessingQueue: ?SharedQueue<$FlowFixMe>; export let resetCurrentlyProcessingQueue: () => void; if (__DEV__) { didWarnUpdateInsideUpdate = false; @@ -475,7 +475,6 @@ export function processUpdateQueue( hasForceUpdate = false; if (__DEV__) { - // $FlowFixMe[escaped-generic] discovered when updating Flow currentlyProcessingQueue = queue.shared; } diff --git a/packages/react-reconciler/src/ReactFiberHooks.js b/packages/react-reconciler/src/ReactFiberHooks.js index 6741a55e4b42f..e9763f9fe289f 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.js +++ b/packages/react-reconciler/src/ReactFiberHooks.js @@ -165,7 +165,7 @@ export type UpdateQueue = { }; let didWarnAboutMismatchedHooksForComponent; -let didWarnUncachedGetSnapshot; +let didWarnUncachedGetSnapshot: void | true; let didWarnAboutUseWrappedInTryCatch; if (__DEV__) { didWarnAboutMismatchedHooksForComponent = new Set(); diff --git a/packages/react-refresh/src/ReactFreshRuntime.js b/packages/react-refresh/src/ReactFreshRuntime.js index d81c1140cab95..c9706041ce1ff 100644 --- a/packages/react-refresh/src/ReactFreshRuntime.js +++ b/packages/react-refresh/src/ReactFreshRuntime.js @@ -642,8 +642,8 @@ export function createSignatureFunctionForTransform(): ( getCustomHooks?: () => Array, ) => T | void { if (__DEV__) { - let savedType; - let hasCustomHooks; + let savedType: mixed; + let hasCustomHooks: boolean; let didCollectHooks = false; return function ( type: T, diff --git a/packages/react-server/src/ReactFlightServerConfigStream.js b/packages/react-server/src/ReactFlightServerConfigStream.js index 889a856e49437..43a7f75c80681 100644 --- a/packages/react-server/src/ReactFlightServerConfigStream.js +++ b/packages/react-server/src/ReactFlightServerConfigStream.js @@ -126,6 +126,7 @@ export function processModelChunk( id: number, model: ReactModel, ): Chunk { + // $FlowFixMe[incompatible-type] stringify can return null const json: string = stringify(model, request.toJSON); const row = id.toString(16) + ':' + json + '\n'; return stringToChunk(row); @@ -146,6 +147,7 @@ export function processImportChunk( id: number, clientReferenceMetadata: ReactModel, ): Chunk { + // $FlowFixMe[incompatible-type] stringify can return null const json: string = stringify(clientReferenceMetadata); const row = serializeRowHeader('I', id) + json + '\n'; return stringToChunk(row);