Skip to content
Merged
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
interface NodeRequireFunction {
(moduleName: 'electron'): typeof Electron;
}

interface NodeRequire extends NodeRequireFunction {
resolve: RequireResolve;
cache: NodeRequireCache;
/**
* @deprecated
*/
extensions: NodeExtensions;
main: NodeModule | undefined;
}

export declare var require: NodeRequire;

// Taken from `RemoteMainInterface`
export {app, autoUpdater, BrowserView, BrowserWindow, ClientRequest, clipboard, CommandLine, contentTracing, Cookies, crashReporter, Debugger, desktopCapturer, dialog, Dock, DownloadItem, globalShortcut, inAppPurchase, IncomingMessage, ipcMain, Menu, MenuItem, MessageChannelMain, MessagePortMain, nativeImage, nativeTheme, net, netLog, Notification, powerMonitor, powerSaveBlocker, protocol, screen, ServiceWorkers, session, shell, systemPreferences, TouchBar, TouchBarButton, TouchBarColorPicker, TouchBarGroup, TouchBarLabel, TouchBarOtherItemsProxy, TouchBarPopover, TouchBarScrubber, TouchBarSegmentedControl, TouchBarSlider, TouchBarSpacer, Tray, webContents, WebRequest} from 'electron';
Copy link
Contributor Author

@ffflorian ffflorian Feb 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this since it might not be exported anymore in the next version of Electron.

export * from './dist/src/main'
export * from './dist/src/renderer';
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"package.json",
"main/index.js",
"renderer/index.js",
"dist/src"
]
"dist/src",
"index.d.ts"
],
"types": "index.d.ts"
}