diff --git a/package.json b/package.json index 72c8dfdf7bcd6..d5dfde958c032 100644 --- a/package.json +++ b/package.json @@ -63,8 +63,8 @@ "eslint-plugin-react-internal": "link:./scripts/eslint-rules", "fbjs-scripts": "^3.0.1", "filesize": "^6.0.1", - "flow-bin": "^0.233.0", - "flow-remove-types": "^2.233.0", + "flow-bin": "^0.234.0", + "flow-remove-types": "^2.234.0", "glob": "^7.1.6", "glob-stream": "^6.1.0", "google-closure-compiler": "^20230206.0.0", diff --git a/packages/react-reconciler/src/ReactFiberThenable.js b/packages/react-reconciler/src/ReactFiberThenable.js index 8c302e99a32fc..2f0ac5637afba 100644 --- a/packages/react-reconciler/src/ReactFiberThenable.js +++ b/packages/react-reconciler/src/ReactFiberThenable.js @@ -214,7 +214,7 @@ export function trackUsedThenable( } // Check one more time in case the thenable resolved synchronously. - switch (thenable.status) { + switch ((thenable: Thenable).status) { case 'fulfilled': { const fulfilledThenable: FulfilledThenable = (thenable: any); return fulfilledThenable.value; diff --git a/packages/react-server/src/ReactFizzThenable.js b/packages/react-server/src/ReactFizzThenable.js index 1494b4188e024..60117a6f5265b 100644 --- a/packages/react-server/src/ReactFizzThenable.js +++ b/packages/react-server/src/ReactFizzThenable.js @@ -107,7 +107,7 @@ export function trackUsedThenable( } // Check one more time in case the thenable resolved synchronously - switch (thenable.status) { + switch ((thenable: Thenable).status) { case 'fulfilled': { const fulfilledThenable: FulfilledThenable = (thenable: any); return fulfilledThenable.value; diff --git a/packages/react-server/src/ReactFlightThenable.js b/packages/react-server/src/ReactFlightThenable.js index cfda818f19ffc..d4b1f27395299 100644 --- a/packages/react-server/src/ReactFlightThenable.js +++ b/packages/react-server/src/ReactFlightThenable.js @@ -107,7 +107,7 @@ export function trackUsedThenable( } // Check one more time in case the thenable resolved synchronously - switch (thenable.status) { + switch ((thenable: Thenable).status) { case 'fulfilled': { const fulfilledThenable: FulfilledThenable = (thenable: any); return fulfilledThenable.value; diff --git a/packages/react/src/ReactChildren.js b/packages/react/src/ReactChildren.js index 7296a452c00ad..0e4c699f477f6 100644 --- a/packages/react/src/ReactChildren.js +++ b/packages/react/src/ReactChildren.js @@ -127,7 +127,7 @@ function resolveThenable(thenable: Thenable): T { } // Check one more time in case the thenable resolved synchronously. - switch (thenable.status) { + switch ((thenable: Thenable).status) { case 'fulfilled': { const fulfilledThenable: FulfilledThenable = (thenable: any); return fulfilledThenable.value; diff --git a/packages/react/src/ReactLazy.js b/packages/react/src/ReactLazy.js index e1b222ad8b222..d1d1088aaeb0d 100644 --- a/packages/react/src/ReactLazy.js +++ b/packages/react/src/ReactLazy.js @@ -61,7 +61,10 @@ function lazyInitializer(payload: Payload): T { // end up fixing it if the resolution was a concurrency bug. thenable.then( moduleObject => { - if (payload._status === Pending || payload._status === Uninitialized) { + if ( + (payload: Payload)._status === Pending || + payload._status === Uninitialized + ) { // Transition to the next state. const resolved: ResolvedPayload = (payload: any); resolved._status = Resolved; @@ -69,7 +72,10 @@ function lazyInitializer(payload: Payload): T { } }, error => { - if (payload._status === Pending || payload._status === Uninitialized) { + if ( + (payload: Payload)._status === Pending || + payload._status === Uninitialized + ) { // Transition to the next state. const rejected: RejectedPayload = (payload: any); rejected._status = Rejected; diff --git a/yarn.lock b/yarn.lock index 3d545a8d652e8..54fd49b8fff34 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8321,12 +8321,12 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== -flow-bin@^0.233.0: - version "0.233.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.233.0.tgz#e31951c81d3ec590e1cbfd96e540f6dd2459554c" - integrity sha512-BInTgW8v6xdWzVcItgKKUYCacheMw78Xrrn0Ziii5lN+vf/RKmvVX9mFHuOSN1zawZuq7GpqmT6oIS/oQuOAQg== +flow-bin@^0.234.0: + version "0.234.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.234.0.tgz#17dfc5aac1d928b6d7194f93bd0bf742d735c77d" + integrity sha512-uLmvfFRW6yEcz2wSJ2H6192RwknBpzAHBezDcXzmxJASxB6QzjKadhPxZvsJ74uJ+9Th1hDNuRB4mGrVUeneyA== -flow-remove-types@^2.233.0: +flow-remove-types@^2.234.0: version "2.238.2" resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-2.238.2.tgz#85c9d26e83ba395f0206a23bce438223bc035609" integrity sha512-WJXRomjPiZ34nG14y7AceoPxg1L00FxjPSA3TDBTG2OPt8QFNtiYEmO4/3WG58n3C4wjxyVuoE6KjxQIvCDyjw==