[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
This commit is contained in:
Jan Kassens
2023-03-27 13:43:04 +02:00
committed by GitHub
parent 768f965de2
commit afea1d0c53
90 changed files with 164 additions and 209 deletions
@@ -77,7 +77,7 @@ export function describeNativeComponentFrame(
let control;
const previousPrepareStackTrace = Error.prepareStackTrace;
// $FlowFixMe It does accept undefined.
// $FlowFixMe[incompatible-type] It does accept undefined.
Error.prepareStackTrace = undefined;
reentry = true;
@@ -98,7 +98,7 @@ export function describeNativeComponentFrame(
const Fake = function () {
throw Error();
};
// $FlowFixMe
// $FlowFixMe[prop-missing]
Object.defineProperty(Fake.prototype, 'props', {
set: function () {
// We use a throwing setter instead of frozen or non-writable props