mirror of
https://github.com/electron/electron.git
synced 2026-01-09 23:48:01 -05:00
refactor: convert ipc-renderer.ts to TypeScript (#19556)
* refactor: convert ipc-renderer.ts to TypeScript * Update typings/internal-ambient.d.ts Co-Authored-By: Samuel Attard <sattard@slack-corp.com>
This commit is contained in:
committed by
Charles Kerr
parent
ee64c6ab86
commit
3011a0f14f
9
typings/internal-ambient.d.ts
vendored
9
typings/internal-ambient.d.ts
vendored
@@ -14,6 +14,14 @@ declare namespace NodeJS {
|
||||
isComponentBuild(): boolean;
|
||||
}
|
||||
|
||||
interface IpcBinding {
|
||||
send(internal: boolean, channel: string, args: any[]): void;
|
||||
sendSync(internal: boolean, channel: string, args: any[]): any;
|
||||
sendToHost(channel: string, args: any[]): void;
|
||||
sendTo(internal: boolean, sendToAll: boolean, webContentsId: number, channel: string, args: any[]): void;
|
||||
invoke<T>(channel: string, args: any[]): Promise<{ error: string, result: T }>;
|
||||
}
|
||||
|
||||
interface V8UtilBinding {
|
||||
getHiddenValue<T>(obj: any, key: string): T;
|
||||
setHiddenValue<T>(obj: any, key: string, value: T): void;
|
||||
@@ -28,6 +36,7 @@ declare namespace NodeJS {
|
||||
_linkedBinding(name: string): any;
|
||||
electronBinding(name: string): any;
|
||||
electronBinding(name: 'features'): FeaturesBinding;
|
||||
electronBinding(name: 'ipc'): { ipc: IpcBinding };
|
||||
electronBinding(name: 'v8_util'): V8UtilBinding;
|
||||
electronBinding(name: 'app'): { app: Electron.App, App: Function };
|
||||
electronBinding(name: 'command_line'): Electron.CommandLine;
|
||||
|
||||
Reference in New Issue
Block a user