-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Export types from main and renderer, fix main types (#58)
- Loading branch information
Showing
4 changed files
with
61 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,60 @@ | ||
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; | ||
import * as Electron from 'electron'; | ||
|
||
// 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'; | ||
export * from './dist/src/main' | ||
export * from './dist/src/renderer'; | ||
export var app: Electron.App; | ||
export var autoUpdater: Electron.AutoUpdater; | ||
export var BrowserView: typeof Electron.BrowserView; | ||
export var BrowserWindow: typeof Electron.BrowserWindow; | ||
export var ClientRequest: typeof Electron.ClientRequest; | ||
export var clipboard: Electron.Clipboard; | ||
export var CommandLine: typeof Electron.CommandLine; | ||
export var contentTracing: Electron.ContentTracing; | ||
export var Cookies: typeof Electron.Cookies; | ||
export var crashReporter: Electron.CrashReporter; | ||
export var Debugger: typeof Electron.Debugger; | ||
export var desktopCapturer: Electron.DesktopCapturer; | ||
export var dialog: Electron.Dialog; | ||
export var Dock: typeof Electron.Dock; | ||
export var DownloadItem: typeof Electron.DownloadItem; | ||
export var globalShortcut: Electron.GlobalShortcut; | ||
export var inAppPurchase: Electron.InAppPurchase; | ||
export var IncomingMessage: typeof Electron.IncomingMessage; | ||
export var ipcMain: Electron.IpcMain; | ||
export var Menu: typeof Electron.Menu; | ||
export var MenuItem: typeof Electron.MenuItem; | ||
export var MessageChannelMain: typeof Electron.MessageChannelMain; | ||
export var MessagePortMain: typeof Electron.MessagePortMain; | ||
export var nativeImage: typeof Electron.NativeImage; | ||
export var nativeTheme: Electron.NativeTheme; | ||
export var net: Electron.Net; | ||
export var netLog: Electron.NetLog; | ||
export var Notification: typeof Electron.Notification; | ||
export var powerMonitor: Electron.PowerMonitor; | ||
export var powerSaveBlocker: Electron.PowerSaveBlocker; | ||
export var protocol: Electron.Protocol; | ||
export var screen: Electron.Screen; | ||
export var ServiceWorkers: typeof Electron.ServiceWorkers; | ||
export var session: typeof Electron.Session; | ||
export var shell: Electron.Shell; | ||
export var systemPreferences: Electron.SystemPreferences; | ||
export var TouchBar: typeof Electron.TouchBar; | ||
export var TouchBarButton: typeof Electron.TouchBarButton; | ||
export var TouchBarColorPicker: typeof Electron.TouchBarColorPicker; | ||
export var TouchBarGroup: typeof Electron.TouchBarGroup; | ||
export var TouchBarLabel: typeof Electron.TouchBarLabel; | ||
export var TouchBarOtherItemsProxy: typeof Electron.TouchBarOtherItemsProxy; | ||
export var TouchBarPopover: typeof Electron.TouchBarPopover; | ||
export var TouchBarScrubber: typeof Electron.TouchBarScrubber; | ||
export var TouchBarSegmentedControl: typeof Electron.TouchBarSegmentedControl; | ||
export var TouchBarSlider: typeof Electron.TouchBarSlider; | ||
export var TouchBarSpacer: typeof Electron.TouchBarSpacer; | ||
export var Tray: typeof Electron.Tray; | ||
export var webContents: typeof Electron.WebContents; | ||
export var WebRequest: typeof Electron.WebRequest; | ||
|
||
// Taken from `Remote` | ||
export function getCurrentWebContents(): Electron.WebContents; | ||
export function getCurrentWindow(): Electron.BrowserWindow; | ||
export function getGlobal(name: string): any; | ||
export var process: NodeJS.Process; | ||
export var require: NodeJS.Require; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from '../dist/src/main'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from '../dist/src/renderer'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1502a4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When can we expect this published? This is a blocker for some migration work I'm doing