Update dependency electron-devtools-installer to v4 (#2044)
* Update dependency electron-devtools-installer to v4 * Update to v4 sigs Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
18
src/@types/electron-devtools-installer.d.ts
vendored
18
src/@types/electron-devtools-installer.d.ts
vendored
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
Copyright 2024 New Vector Ltd.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
// import "electron-devtools-installer";
|
||||
|
||||
declare module "electron-devtools-installer" {
|
||||
interface ExtensionReference {
|
||||
id: string;
|
||||
electron: string;
|
||||
}
|
||||
|
||||
export const REACT_DEVELOPER_TOOLS: ExtensionReference;
|
||||
export default function install(extension: ExtensionReference): Promise<string>;
|
||||
}
|
||||
@@ -376,9 +376,9 @@ app.on("ready", async () => {
|
||||
|
||||
if (argv["devtools"]) {
|
||||
try {
|
||||
const { default: installExt, REACT_DEVELOPER_TOOLS } = await import("electron-devtools-installer");
|
||||
installExt(REACT_DEVELOPER_TOOLS)
|
||||
.then((name: string) => console.log(`Added Extension: ${name}`))
|
||||
const { installExtension, REACT_DEVELOPER_TOOLS } = await import("electron-devtools-installer");
|
||||
installExtension(REACT_DEVELOPER_TOOLS)
|
||||
.then((ext) => console.log(`Added Extension: ${ext.name}`))
|
||||
.catch((err: unknown) => console.log("An error occurred: ", err));
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
Reference in New Issue
Block a user