Skip to content

Commit f02a5f5

Browse files
committed
Flow upgrade to 0.182
ghstack-source-id: b9bb8c1 Pull Request resolved: #25419
1 parent 72593f0 commit f02a5f5

22 files changed

+39
-62
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"eslint-plugin-react-internal": "link:./scripts/eslint-rules",
6464
"fbjs-scripts": "1.2.0",
6565
"filesize": "^6.0.1",
66-
"flow-bin": "^0.176.0",
66+
"flow-bin": "^0.182.0",
6767
"glob": "^7.1.6",
6868
"glob-stream": "^6.1.0",
6969
"google-closure-compiler": "^20200517.0.0",

packages/react-devtools-inline/src/backend.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export function activate(
8080
bridge,
8181
}: {
8282
bridge?: BackendBridge,
83+
// $FlowFixMe[incompatible-exact]
8384
} = {},
8485
): void {
8586
if (bridge == null) {

packages/react-devtools-inline/src/frontend.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export function initialize(
6262
}: {
6363
bridge?: FrontendBridge,
6464
store?: Store,
65+
// $FlowFixMe[incompatible-exact]
6566
} = {},
6667
): React.AbstractComponent<Props, mixed> {
6768
if (bridge == null) {

packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-fb.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,5 @@ export const enableProfilerComponentTree = true;
2929
import typeof * as FeatureFlagsType from './DevToolsFeatureFlags.default';
3030
import typeof * as ExportsType from './DevToolsFeatureFlags.core-fb';
3131

32-
// eslint-disable-next-line no-unused-vars
33-
type Check<_X, Y: _X, X: Y = _X> = null;
34-
// eslint-disable-next-line no-unused-expressions
35-
(null: Check<ExportsType, FeatureFlagsType>);
32+
// Flow magic to verify the exports of this file match the original version.
33+
((((null: any): ExportsType): FeatureFlagsType): ExportsType);

packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-oss.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,5 @@ export const enableProfilerComponentTree = true;
2929
import typeof * as FeatureFlagsType from './DevToolsFeatureFlags.default';
3030
import typeof * as ExportsType from './DevToolsFeatureFlags.core-oss';
3131

32-
// eslint-disable-next-line no-unused-vars
33-
type Check<_X, Y: _X, X: Y = _X> = null;
34-
// eslint-disable-next-line no-unused-expressions
35-
(null: Check<ExportsType, FeatureFlagsType>);
32+
// Flow magic to verify the exports of this file match the original version.
33+
((((null: any): ExportsType): FeatureFlagsType): ExportsType);

packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-fb.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,5 @@ export const enableProfilerComponentTree = true;
2929
import typeof * as FeatureFlagsType from './DevToolsFeatureFlags.default';
3030
import typeof * as ExportsType from './DevToolsFeatureFlags.extension-fb';
3131

32-
// eslint-disable-next-line no-unused-vars
33-
type Check<_X, Y: _X, X: Y = _X> = null;
34-
// eslint-disable-next-line no-unused-expressions
35-
(null: Check<ExportsType, FeatureFlagsType>);
32+
// Flow magic to verify the exports of this file match the original version.
33+
((((null: any): ExportsType): FeatureFlagsType): ExportsType);

packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-oss.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,5 @@ export const enableProfilerComponentTree = true;
2929
import typeof * as FeatureFlagsType from './DevToolsFeatureFlags.default';
3030
import typeof * as ExportsType from './DevToolsFeatureFlags.extension-oss';
3131

32-
// eslint-disable-next-line no-unused-vars
33-
type Check<_X, Y: _X, X: Y = _X> = null;
34-
// eslint-disable-next-line no-unused-expressions
35-
(null: Check<ExportsType, FeatureFlagsType>);
32+
// Flow magic to verify the exports of this file match the original version.
33+
((((null: any): ExportsType): FeatureFlagsType): ExportsType);

packages/react-devtools-shared/src/devtools/views/Settings/SettingsModal.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ function SettingsModalImpl(_: {}) {
8282
case 'components':
8383
view = <ComponentsSettings />;
8484
break;
85+
// $FlowFixMe[incompatible-type] is this missing in TabID?
8586
case 'debugging':
8687
view = <DebuggingSettings />;
8788
break;

packages/react-dom-bindings/src/client/ReactDOMFloatClient.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,7 @@ function acquireStyleResource(resource: StyleResource): Instance {
657657
}
658658
}
659659
resource.count++;
660+
// $FlowFixMe[incompatible-return] found when upgrading Flow
660661
return resource.instance;
661662
}
662663

packages/react-dom-bindings/src/events/forks/EventListener-www.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,4 @@ export function removeEventListener(
6666
}
6767

6868
// Flow magic to verify the exports of this file match the original version.
69-
// eslint-disable-next-line no-unused-vars
70-
type Check<_X, Y: _X, X: Y = _X> = null;
71-
// eslint-disable-next-line no-unused-expressions
72-
(null: Check<EventListenerShimType, EventListenerType>);
69+
((((null: any): EventListenerType): EventListenerShimType): EventListenerType);

0 commit comments

Comments
 (0)