chore: remove unused sendToAll + related APIs (#26771)
* chore: remove unused sendToAll + related APIs * refactor: no need to args.ShallowClone() anymore
This commit is contained in:
parent
8eee9d1290
commit
b37982987a
12 changed files with 23 additions and 94 deletions
6
typings/internal-electron.d.ts
vendored
6
typings/internal-electron.d.ts
vendored
|
@ -67,12 +67,11 @@ declare namespace Electron {
|
|||
_windowOpenHandler: ((opts: {url: string, frameName: string, features: string}) => any) | null;
|
||||
_callWindowOpenHandler(event: any, url: string, frameName: string, rawFeatures: string): Electron.BrowserWindowConstructorOptions | null;
|
||||
_setNextChildWebPreferences(prefs: Partial<Electron.BrowserWindowConstructorOptions['webPreferences']> & Pick<Electron.BrowserWindowConstructorOptions, 'backgroundColor'>): void;
|
||||
_send(internal: boolean, sendToAll: boolean, channel: string, args: any): boolean;
|
||||
_sendToFrame(internal: boolean, sendToAll: boolean, frameId: number, channel: string, args: any): boolean;
|
||||
_send(internal: boolean, channel: string, args: any): boolean;
|
||||
_sendToFrame(internal: boolean, frameId: number, channel: string, args: any): boolean;
|
||||
_sendToFrameInternal(frameId: number, channel: string, ...args: any[]): boolean;
|
||||
_postMessage(channel: string, message: any, transfer?: any[]): void;
|
||||
_sendInternal(channel: string, ...args: any[]): void;
|
||||
_sendInternalToAll(channel: string, ...args: any[]): void;
|
||||
_printToPDF(options: any): Promise<Buffer>;
|
||||
_print(options: any, callback?: (success: boolean, failureReason: string) => void): void;
|
||||
_getPrinters(): Electron.PrinterInfo[];
|
||||
|
@ -232,7 +231,6 @@ declare namespace ElectronInternal {
|
|||
|
||||
interface IpcRendererInternal extends Electron.IpcRenderer {
|
||||
invoke<T>(channel: string, ...args: any[]): Promise<T>;
|
||||
sendToAll(webContentsId: number, channel: string, ...args: any[]): void;
|
||||
onMessageFromMain(channel: string, listener: (event: Electron.IpcRendererEvent, ...args: any[]) => void): this;
|
||||
onceMessageFromMain(channel: string, listener: (event: Electron.IpcRendererEvent, ...args: any[]) => void): this;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue