You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flow] make Flow suppressions explicit on the error (#26487)
Added an explicit type to all $FlowFixMe suppressions to reduce
over-suppressions of new errors that might be caused on the same lines.
Also removes suppressions that aren't used (e.g. in a `@noflow` file as
they're purely misleading)
Test Plan:
yarn flow-ci
DiffTrain build for commit afea1d0.
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js
+22-22Lines changed: 22 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -2177,7 +2177,7 @@ function setCurrentlyValidatingElement(element) {
2177
2177
2178
2178
function checkPropTypes(typeSpecs, values, location, componentName, element) {
2179
2179
{
2180
-
// $FlowFixMe This is okay but Flow doesn't know it.
2180
+
// $FlowFixMe[incompatible-use] This is okay but Flow doesn't know it.
2181
2181
var has = Function.call.bind(hasOwnProperty);
2182
2182
2183
2183
for (var typeSpecName in typeSpecs) {
@@ -4114,19 +4114,19 @@ var ReactStrictModeWarnings = {
4114
4114
* problem. (Instead of a confusing exception thrown inside the implementation
4115
4115
* of the `value` object).
4116
4116
*/
4117
-
// $FlowFixMe only called in DEV, so void return is not possible.
4117
+
// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.
4118
4118
function typeName(value) {
4119
4119
{
4120
4120
// toStringTag is needed for namespaced types like Temporal.Instant
4121
4121
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
4122
4122
var type =
4123
4123
(hasToStringTag && value[Symbol.toStringTag]) ||
4124
4124
value.constructor.name ||
4125
-
"Object"; // $FlowFixMe
4125
+
"Object"; // $FlowFixMe[incompatible-return]
4126
4126
4127
4127
return type;
4128
4128
}
4129
-
} // $FlowFixMe only called in DEV, so void return is not possible.
4129
+
} // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.
4130
4130
4131
4131
function willCoercionThrow(value) {
4132
4132
{
@@ -4385,7 +4385,7 @@ var warnForMissingKey = function (child, returnFiber) {};
4385
4385
"React Component in warnForMissingKey should have a _store. " +
4386
4386
"This error is likely caused by a bug in React. Please file an issue."
4387
4387
);
4388
-
} // $FlowFixMe unable to narrow type from mixed to writable object
4388
+
} // $FlowFixMe[cannot-write] unable to narrow type from mixed to writable object
4389
4389
4390
4390
child._store.validated = true;
4391
4391
var componentName = getComponentNameFromFiber(returnFiber) || "Component";
@@ -5301,7 +5301,7 @@ function createChildReconciler(shouldTrackSideEffects) {
5301
5301
// We don't support rendering Generators because it's a mutation.
5302
5302
// See https://github.com/facebook/react/issues/12995
5303
5303
if (
5304
-
typeof Symbol === "function" && // $FlowFixMe Flow doesn't know about toStringTag
5304
+
typeof Symbol === "function" && // $FlowFixMe[prop-missing] Flow doesn't know about toStringTag
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8640,7 +8640,7 @@ var devToolsConfig$jscomp$inline_1007 = {
8640
8640
throwError("TestRenderer does not support findFiberByHostInstance()");
8641
8641
},
8642
8642
bundleType: 0,
8643
-
version: "18.3.0-next-768f965de-20230326",
8643
+
version: "18.3.0-next-afea1d0c5-20230327",
8644
8644
rendererPackageName: "react-test-renderer"
8645
8645
};
8646
8646
varinternals$jscomp$inline_1198={
@@ -8671,7 +8671,7 @@ var internals$jscomp$inline_1198 = {
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9065,7 +9065,7 @@ var devToolsConfig$jscomp$inline_1050 = {
9065
9065
throwError("TestRenderer does not support findFiberByHostInstance()");
9066
9066
},
9067
9067
bundleType: 0,
9068
-
version: "18.3.0-next-768f965de-20230326",
9068
+
version: "18.3.0-next-afea1d0c5-20230327",
9069
9069
rendererPackageName: "react-test-renderer"
9070
9070
};
9071
9071
varinternals$jscomp$inline_1239={
@@ -9096,7 +9096,7 @@ var internals$jscomp$inline_1239 = {
0 commit comments