mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user