signal-desktop/patches/electron-util+0.13.1.patch
2021-11-08 22:43:37 +01:00

46 lines
1.7 KiB
Diff

diff --git a/node_modules/electron-util/index.d.ts b/node_modules/electron-util/index.d.ts
index 8d493d5..fc522af 100644
--- a/node_modules/electron-util/index.d.ts
+++ b/node_modules/electron-util/index.d.ts
@@ -1,7 +1,7 @@
/// <reference lib="dom"/>
/// <reference types="electron"/>
/// <reference types="node"/>
-import {AllElectron, Remote, BrowserWindow, Size, Rectangle, Session, MenuItemConstructorOptions, MenuItem} from 'electron';
+import { BrowserWindow, Size, Rectangle, Session, MenuItemConstructorOptions, MenuItem} from 'electron';
import {Options as NewGithubIssueUrlOptions} from 'new-github-issue-url';
import {RequireAtLeastOne} from 'type-fest';
@@ -14,7 +14,7 @@ Access the Electron APIs in both the main and renderer process without having to
api.app.quit(); // The `app` API is usually only available in the main process.
```
*/
-export const api: AllElectron | Remote;
+export const api: never;
/**
Check for various things.
diff --git a/node_modules/electron-util/source/is.js b/node_modules/electron-util/source/is.js
index 9a7622f..9530a9c 100644
--- a/node_modules/electron-util/source/is.js
+++ b/node_modules/electron-util/source/is.js
@@ -1,5 +1,4 @@
'use strict';
-const isDev = require('electron-is-dev');
const isUsingAsar = require('./is-using-asar');
module.exports = {
@@ -9,7 +8,12 @@ module.exports = {
main: process.type === 'browser',
renderer: process.type === 'renderer',
usingAsar: isUsingAsar,
- development: isDev,
macAppStore: process.mas === true,
windowsStore: process.windowsStore === true
};
+
+Object.defineProperty(module.exports, 'isDev', {
+ get() {
+ throw new Error('Not supported in electron 15');
+ }
+});