mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
github-electron: Fix callback's return type of app.makeSingleInstance() (#9250)
The callback should return `void`, not `boolean`. https://github.com/electron/electron/blob/master/docs/api/app.md#appmakesingleinstancecallback
This commit is contained in:
@@ -45,7 +45,6 @@ var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory)
|
||||
if (mainWindow.isMinimized()) mainWindow.restore();
|
||||
mainWindow.focus();
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
if (shouldQuit) {
|
||||
|
||||
2
github-electron/github-electron.d.ts
vendored
2
github-electron/github-electron.d.ts
vendored
@@ -280,7 +280,7 @@ declare namespace Electron {
|
||||
* multiple instances of your app to run, this will ensure that only a single instance
|
||||
* of your app is running, and other instances signal this instance and exit.
|
||||
*/
|
||||
makeSingleInstance(callback: (args: string[], workingDirectory: string) => boolean): boolean;
|
||||
makeSingleInstance(callback: (args: string[], workingDirectory: string) => void): boolean;
|
||||
/**
|
||||
* Changes the Application User Model ID to id.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user