Skip to content

remove flow check in electron app.js #26184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions packages/react-devtools/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

const {app, BrowserWindow} = require('electron'); // Module to create native browser window.
Expand Down Expand Up @@ -40,17 +38,12 @@ app.on('ready', function () {
}

// https://stackoverflow.com/questions/32402327/
// $FlowFixMe[incompatible-use] found when upgrading Flow
mainWindow.webContents.on(
'new-window',
function (event: $FlowFixMe, url: $FlowFixMe) {
event.preventDefault();
require('electron').shell.openExternal(url);
},
);
mainWindow.webContents.on('new-window', function (event, url) {
event.preventDefault();
require('electron').shell.openExternal(url);
});

// and load the index.html of the app.
// $FlowFixMe[incompatible-use] found when upgrading Flow
mainWindow.loadURL('file://' + __dirname + '/app.html'); // eslint-disable-line no-path-concat
// $FlowFixMe[incompatible-use] found when upgrading Flow
mainWindow.webContents.executeJavaScript(
Expand All @@ -61,7 +54,6 @@ app.on('ready', function () {
);

// Emitted when the window is closed.
// $FlowFixMe[incompatible-use] found when upgrading Flow
mainWindow.on('closed', function () {
mainWindow = null;
});
Expand Down