Skip to content

Commit e8e51ac

Browse files
yungstersfacebook-github-bot
authored andcommitted
RN: Flowify Remaining Files (#51822)
Summary: Pull Request resolved: #51822 Adds `flow` to the remaining files without it, in React Native. After this, every `*.{flow,js}` file in React Native will have either `flow` or `noflow`. Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D75980238 fbshipit-source-id: 84cd88e4eb0b0b1dc69df247de79a75c2119bf96
1 parent 48216b2 commit e8e51ac

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

packages/debugger-shell/src/electron/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @flow
7+
* @flow strict-local
88
* @format
99
*/
1010

1111
/*::
1212
export type * from './index.flow';
1313
*/
1414

15-
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
15+
if (!Boolean(process.env.BUILD_EXCLUDE_BABEL_REGISTER)) {
1616
require('../../../../scripts/babel-register').registerForMonorepo();
1717
}
1818

packages/debugger-shell/src/electron/preload.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,27 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7+
* @flow strict-local
78
* @format
89
*/
910

11+
// $FlowFixMe[prop-missing]
1012
const {contextBridge, ipcRenderer} = require('electron');
1113

1214
contextBridge.executeInMainWorld({
1315
func: ipcDevTools => {
1416
let didDecorateInspectorFrontendHostInstance = false;
1517
// reactNativeDecorateInspectorFrontendHostInstance was introduced in
1618
// https://github.com/facebook/react-native-devtools-frontend/pull/168
17-
globalThis.reactNativeDecorateInspectorFrontendHostInstance =
18-
InspectorFrontendHostInstance => {
19-
didDecorateInspectorFrontendHostInstance = true;
20-
InspectorFrontendHostInstance.bringToFront = () => {
21-
ipcDevTools.bringToFront();
22-
};
19+
// $FlowIgnore[prop-missing]
20+
globalThis.reactNativeDecorateInspectorFrontendHostInstance = (
21+
InspectorFrontendHostInstance: $FlowFixMe,
22+
) => {
23+
didDecorateInspectorFrontendHostInstance = true;
24+
InspectorFrontendHostInstance.bringToFront = () => {
25+
ipcDevTools.bringToFront();
2326
};
27+
};
2428

2529
document.addEventListener('DOMContentLoaded', () => {
2630
if (!didDecorateInspectorFrontendHostInstance) {

0 commit comments

Comments
 (0)