refactor: prevent consistent early exception (#24191)

* refactor: prevent consistent early exception

* Use _linkedBinding where possible

* Remove dead electronBinding
This commit is contained in:
Shelley Vohr 2020-06-22 20:32:45 -07:00 committed by GitHub
parent 4c77fe318d
commit 659e79fc08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 134 additions and 145 deletions

View file

@ -89,21 +89,17 @@ declare namespace NodeJS {
}
interface Process {
/**
* DO NOT USE DIRECTLY, USE process.electronBinding
*/
_linkedBinding(name: string): any;
electronBinding(name: string): any;
electronBinding(name: 'features'): FeaturesBinding;
electronBinding(name: 'ipc'): { ipc: IpcRendererBinding };
electronBinding(name: 'v8_util'): V8UtilBinding;
electronBinding(name: 'app'): { app: Electron.App, App: Function };
electronBinding(name: 'command_line'): Electron.CommandLine;
electronBinding(name: 'desktop_capturer'): {
_linkedBinding(name: 'electron_renderer_ipc'): { ipc: IpcRendererBinding };
_linkedBinding(name: 'electron_common_v8_util'): V8UtilBinding;
_linkedBinding(name: 'electron_common_features'): FeaturesBinding;
_linkedBinding(name: 'electron_browser_app'): { app: Electron.App, App: Function };
_linkedBinding(name: 'electron_common_command_line'): Electron.CommandLine;
_linkedBinding(name: 'electron_browser_desktop_capturer'): {
createDesktopCapturer(): ElectronInternal.DesktopCapturer;
getMediaSourceIdForWebContents(requestWebContentsId: number, webContentsId: number): string;
};
electronBinding(name: 'net'): {
_linkedBinding(name: 'electron_browser_net'): {
isValidHeaderName: (headerName: string) => boolean;
isValidHeaderValue: (headerValue: string) => boolean;
Net: any;