electron/remote

`Electron` doesn't exist 23 properties on `index.d.ts`

Muhammed-Rahif opened this issue ยท 3 comments

"@electron/remote": "^2.0.1",
"electron": "^16.0.0",

I received such errors

Error: node_modules/@electron/remote/index.d.ts:8:43 - error TS2339: Property 'ClientRequest' does not exist on type 'typeof CrossProcessExports'.
8 export var ClientRequest: typeof Electron.ClientRequest;
Error: node_modules/@electron/remote/index.d.ts:10:41 - error TS2339: Property 'CommandLine' does not exist on type 'typeof CrossProcessExports'.
10 export var CommandLine: typeof Electron.CommandLine;
Error: node_modules/@electron/remote/index.d.ts:12:37 - error TS2339: Property 'Cookies' does not exist on type 'typeof CrossProcessExports'.
12 export var Cookies: typeof Electron.Cookies;
Error: node_modules/@electron/remote/index.d.ts:14:38 - error TS2339: Property 'Debugger' does not exist on type 'typeof CrossProcessExports'.
14 export var Debugger: typeof Electron.Debugger;
Error: node_modules/@electron/remote/index.d.ts:17:34 - error TS2339: Property 'Dock' does not exist on type 'typeof CrossProcessExports'.
17 export var Dock: typeof Electron.Dock;
Error: node_modules/@electron/remote/index.d.ts:18:42 - error TS2339: Property 'DownloadItem' does not exist on type 'typeof CrossProcessExports'.
18 export var DownloadItem: typeof Electron.DownloadItem;
Error: node_modules/@electron/remote/index.d.ts:21:45 - error TS2339: Property 'IncomingMessage' does not exist on type 'typeof CrossProcessExports'.
21 export var IncomingMessage: typeof Electron.IncomingMessage;
Error: node_modules/@electron/remote/index.d.ts:26:45 - error TS2339: Property 'MessagePortMain' does not exist on type 'typeof CrossProcessExports'.
26 export var MessagePortMain: typeof Electron.MessagePortMain;
Error: node_modules/@electron/remote/index.d.ts:27:41 - error TS2551: Property 'NativeImage' does not exist on type 'typeof CrossProcessExports'. Did you mean 'nativeImage'?
27 export var nativeImage: typeof Electron.NativeImage;
  node_modules/electron/electron.d.ts:16950:11
    16950     const nativeImage: typeof NativeImage;
    'nativeImage' is declared here.
Error: node_modules/@electron/remote/index.d.ts:36:44 - error TS2339: Property 'ServiceWorkers' does not exist on type 'typeof CrossProcessExports'.
36 export var ServiceWorkers: typeof Electron.ServiceWorkers;
Error: node_modules/@electron/remote/index.d.ts:37:37 - error TS2551: Property 'Session' does not exist on type 'typeof CrossProcessExports'. Did you mean 'session'?
37 export var session: typeof Electron.Session;
  node_modules/electron/electron.d.ts:16970:11
    16970     const session: typeof Session;
    'session' is declared here.
Error: node_modules/@electron/remote/index.d.ts:41:44 - error TS2339: Property 'TouchBarButton' does not exist on type 'typeof CrossProcessExports'.
41 export var TouchBarButton: typeof Electron.TouchBarButton;
Error: node_modules/@electron/remote/index.d.ts:42:49 - error TS2339: Property 'TouchBarColorPicker' does not exist on type 'typeof CrossProcessExports'.
42 export var TouchBarColorPicker: typeof Electron.TouchBarColorPicker;
Error: node_modules/@electron/remote/index.d.ts:43:43 - error TS2339: Property 'TouchBarGroup' does not exist on type 'typeof CrossProcessExports'.
43 export var TouchBarGroup: typeof Electron.TouchBarGroup;
Error: node_modules/@electron/remote/index.d.ts:44:43 - error TS2339: Property 'TouchBarLabel' does not exist on type 'typeof CrossProcessExports'.
44 export var TouchBarLabel: typeof Electron.TouchBarLabel;
46 export var TouchBarPopover: typeof Electron.TouchBarPopover;
Error: node_modules/@electron/remote/index.d.ts:47:46 - error TS2339: Property 'TouchBarScrubber' does not exist on type 'typeof CrossProcessExports'.
47 export var TouchBarScrubber: typeof Electron.TouchBarScrubber;
Error: node_modules/@electron/remote/index.d.ts:48:54 - error TS2339: Property 'TouchBarSegmentedControl' does not exist on type 'typeof CrossProcessExports'.
48 export var TouchBarSegmentedControl: typeof Electron.TouchBarSegmentedControl;
Error: node_modules/@electron/remote/index.d.ts:49:44 - error TS2339: Property 'TouchBarSlider' does not exist on type 'typeof CrossProcessExports'.
49 export var TouchBarSlider: typeof Electron.TouchBarSlider;
Error: node_modules/@electron/remote/index.d.ts:50:44 - error TS2339: Property 'TouchBarSpacer' does not exist on type 'typeof CrossProcessExports'.
50 export var TouchBarSpacer: typeof Electron.TouchBarSpacer;
Error: node_modules/@electron/remote/index.d.ts:52:41 - error TS2551: Property 'WebContents' does not exist on type 'typeof CrossProcessExports'. Did you mean 'webContents'?
52 export var webContents: typeof Electron.WebContents;
  node_modules/electron/electron.d.ts:16989:11
    16989     const webContents: typeof WebContents;
    'webContents' is declared here.
Error: node_modules/@electron/remote/index.d.ts:53:40 - error TS2339: Property 'WebRequest' does not exist on type 'typeof CrossProcessExports'.
53 export var WebRequest: typeof Electron.WebRequest;

Originally posted by @oleg-tsybulsky in #94 (comment)

Errors that I got :-

node_modules/@electron/remote/index.d.ts:8:43 - error TS2339: Property 'ClientRequest' does not exist on type 'typeof CrossProcessExports'.

8 export var ClientRequest: typeof Electron.ClientRequest;
                                            ~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:10:41 - error TS2339: Property 'CommandLine' does not exist on type 'typeof CrossProcessExports'.

10 export var CommandLine: typeof Electron.CommandLine;
                                           ~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:12:37 - error TS2339: Property 'Cookies' does not exist on type 'typeof CrossProcessExports'.

12 export var Cookies: typeof Electron.Cookies;
                                       ~~~~~~~

node_modules/@electron/remote/index.d.ts:14:38 - error TS2339: Property 'Debugger' does not exist on type 'typeof CrossProcessExports'.

14 export var Debugger: typeof Electron.Debugger;
                                        ~~~~~~~~

node_modules/@electron/remote/index.d.ts:17:34 - error TS2339: Property 'Dock' does not exist on type 'typeof CrossProcessExports'.

17 export var Dock: typeof Electron.Dock;
                                    ~~~~

node_modules/@electron/remote/index.d.ts:18:42 - error TS2339: Property 'DownloadItem' does not exist on type 'typeof CrossProcessExports'.

18 export var DownloadItem: typeof Electron.DownloadItem;
                                            ~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:21:45 - error TS2339: Property 'IncomingMessage' does not exist on type 'typeof CrossProcessExports'.

21 export var IncomingMessage: typeof Electron.IncomingMessage;
                                               ~~~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:26:45 - error TS2339: Property 'MessagePortMain' does not exist on type 'typeof CrossProcessExports'.

26 export var MessagePortMain: typeof Electron.MessagePortMain;
                                               ~~~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:27:41 - error TS2551: Property 'NativeImage' does not exist on type 'typeof CrossProcessExports'. Did you mean 'nativeImage'?

27 export var nativeImage: typeof Electron.NativeImage;
                                           ~~~~~~~~~~~

  node_modules/electron/electron.d.ts:16955:11
    16955     const nativeImage: typeof NativeImage;
                    ~~~~~~~~~~~
    'nativeImage' is declared here.

node_modules/@electron/remote/index.d.ts:36:44 - error TS2339: Property 'ServiceWorkers' does not exist on type 'typeof CrossProcessExports'.

36 export var ServiceWorkers: typeof Electron.ServiceWorkers;
                                              ~~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:37:37 - error TS2551: Property 'Session' does not exist on type 'typeof CrossProcessExports'. Did you mean 'session'?

37 export var session: typeof Electron.Session;
                                       ~~~~~~~

  node_modules/electron/electron.d.ts:16975:11
    16975     const session: typeof Session;
                    ~~~~~~~
    'session' is declared here.

node_modules/@electron/remote/index.d.ts:41:44 - error TS2339: Property 'TouchBarButton' does not exist on type 'typeof CrossProcessExports'.

41 export var TouchBarButton: typeof Electron.TouchBarButton;
                                              ~~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:42:49 - error TS2339: Property 'TouchBarColorPicker' does not exist on type 'typeof CrossProcessExports'.

42 export var TouchBarColorPicker: typeof Electron.TouchBarColorPicker;
                                                   ~~~~~~~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:43:43 - error TS2339: Property 'TouchBarGroup' does not exist on type 'typeof CrossProcessExports'.

43 export var TouchBarGroup: typeof Electron.TouchBarGroup;
                                             ~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:44:43 - error TS2339: Property 'TouchBarLabel' does not exist on type 'typeof CrossProcessExports'.

44 export var TouchBarLabel: typeof Electron.TouchBarLabel;
                                             ~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:45:53 - error TS2339: Property 'TouchBarOtherItemsProxy' does not exist on type 'typeof CrossProcessExports'.

45 export var TouchBarOtherItemsProxy: typeof Electron.TouchBarOtherItemsProxy;
                                                       ~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:46:45 - error TS2339: Property 'TouchBarPopover' does not exist on type 'typeof CrossProcessExports'.

46 export var TouchBarPopover: typeof Electron.TouchBarPopover;
                                               ~~~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:47:46 - error TS2339: Property 'TouchBarScrubber' does not exist on type 'typeof CrossProcessExports'.

47 export var TouchBarScrubber: typeof Electron.TouchBarScrubber;
                                                ~~~~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:48:54 - error TS2339: Property 'TouchBarSegmentedControl' does not exist on type 'typeof CrossProcessExports'.

48 export var TouchBarSegmentedControl: typeof Electron.TouchBarSegmentedControl;
                                                        ~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:49:44 - error TS2339: Property 'TouchBarSlider' does not exist on type 'typeof CrossProcessExports'.

49 export var TouchBarSlider: typeof Electron.TouchBarSlider;
                                              ~~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:50:44 - error TS2339: Property 'TouchBarSpacer' does not exist on type 'typeof CrossProcessExports'.

50 export var TouchBarSpacer: typeof Electron.TouchBarSpacer;
                                              ~~~~~~~~~~~~~~

node_modules/@electron/remote/index.d.ts:52:41 - error TS2551: Property 'WebContents' does not exist on type 'typeof CrossProcessExports'. Did you mean 'webContents'?

52 export var webContents: typeof Electron.WebContents;
                                           ~~~~~~~~~~~

  node_modules/electron/electron.d.ts:16994:11
    16994     const webContents: typeof WebContents;
                    ~~~~~~~~~~~
    'webContents' is declared here.

node_modules/@electron/remote/index.d.ts:53:40 - error TS2339: Property 'WebRequest' does not exist on type 'typeof CrossProcessExports'.

53 export var WebRequest: typeof Electron.WebRequest;
                                          ~~~~~~~~~~


Found 23 errors.

Copying and pasting this #94 (comment) code snippet resolved the issue temporarily but still have the error on fresh install or in GitHub actions run.

Any chance this could get looked at soon? It's going to break my CD pipeline (if I ever actually fix all the other issues I have with it ๐Ÿ˜‰)

This should be fixed in 2.0.8 (#109, #111).