@samitouri / QOS-React-2 / commits / 1a49e2d833

remove flow check in electron app.js (#26184)

When we were upgrading flow in https://github.com/facebook/react/commit/6ddcbd4f96cb103de3978617a53c200baf5b546c we added `$FlowFixMe` for some parameters in this file. However, this file is not compiled at all, and the `:` syntax breaks the code. This PR removes the flow check in this file

Mengdi Chen committed Feb 17, 2023 at 11:54 UTC 1a49e2d833ed24b4d541fc70659a19821585e570
1 file changed +4 -12
packages/react-devtools/app.js
+4 -12
@@ -3,8 +3,6 @@
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 - *
7 - * @flow
6 */
7
8 const {app, BrowserWindow} = require('electron'); // Module to create native browser window.
@@ -40,17 +38,12 @@ app.on('ready', function () {
38 }
39
40 // https://stackoverflow.com/questions/32402327/
43 - // $FlowFixMe[incompatible-use] found when upgrading Flow
44 - mainWindow.webContents.on(
45 - 'new-window',
46 - function (event: $FlowFixMe, url: $FlowFixMe) {
47 - event.preventDefault();
48 - require('electron').shell.openExternal(url);
49 - },
50 - );
41 + mainWindow.webContents.on('new-window', function (event, url) {
42 + event.preventDefault();
43 + require('electron').shell.openExternal(url);
44 + });
45
46 // and load the index.html of the app.
53 - // $FlowFixMe[incompatible-use] found when upgrading Flow
47 mainWindow.loadURL('file://' + __dirname + '/app.html'); // eslint-disable-line no-path-concat
48 // $FlowFixMe[incompatible-use] found when upgrading Flow
49 mainWindow.webContents.executeJavaScript(
@@ -61,7 +54,6 @@ app.on('ready', function () {
54 );
55
56 // Emitted when the window is closed.
64 - // $FlowFixMe[incompatible-use] found when upgrading Flow
57 mainWindow.on('closed', function () {
58 mainWindow = null;
59 });