chore: remove bunch of usages of any (#27512)
This commit is contained in:
parent
c7aa35a519
commit
79b3393768
16 changed files with 101 additions and 81 deletions
32
typings/internal-electron.d.ts
vendored
32
typings/internal-electron.d.ts
vendored
|
@ -37,8 +37,12 @@ declare namespace Electron {
|
|||
removeListener(event: '-touch-bar-interaction', listener: (event: Event, itemID: string, details: any) => void): this;
|
||||
}
|
||||
|
||||
interface BrowserWindowConstructorOptions {
|
||||
webContents?: WebContents;
|
||||
}
|
||||
|
||||
interface ContextBridge {
|
||||
internalContextBridge: {
|
||||
internalContextBridge?: {
|
||||
contextIsolationEnabled: boolean;
|
||||
overrideGlobalValueFromIsolatedWorld(keys: string[], value: any): void;
|
||||
overrideGlobalValueWithDynamicPropsFromIsolatedWorld(keys: string[], value: any): void;
|
||||
|
@ -88,6 +92,7 @@ declare namespace Electron {
|
|||
}
|
||||
|
||||
interface WebFrame {
|
||||
_executeJavaScript(code: string, userGesture?: boolean): Promise<any>;
|
||||
getWebFrameId(window: Window): number;
|
||||
allowGuestViewElementDefinition(window: Window, context: any): void;
|
||||
}
|
||||
|
@ -100,7 +105,7 @@ declare namespace Electron {
|
|||
|
||||
interface WebPreferences {
|
||||
guestInstanceId?: number;
|
||||
openerId?: number;
|
||||
openerId?: number | null;
|
||||
disablePopups?: boolean;
|
||||
preloadURL?: string;
|
||||
embedder?: Electron.WebContents;
|
||||
|
@ -147,9 +152,14 @@ declare namespace Electron {
|
|||
acceleratorWorksWhenHidden?: boolean;
|
||||
}
|
||||
|
||||
interface IpcMainEvent {
|
||||
sendReply(value: any): void;
|
||||
}
|
||||
|
||||
interface IpcMainInvokeEvent {
|
||||
sendReply(value: any): void;
|
||||
_reply(value: any): void;
|
||||
_throw(error: Error): void;
|
||||
_throw(error: Error | string): void;
|
||||
}
|
||||
|
||||
const deprecate: ElectronInternal.DeprecationUtil;
|
||||
|
@ -250,10 +260,26 @@ declare namespace ElectronInternal {
|
|||
once(channel: string, listener: (event: IpcMainInternalEvent, ...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
interface Event extends Electron.Event {
|
||||
sender: WebContents;
|
||||
}
|
||||
|
||||
interface LoadURLOptions extends Electron.LoadURLOptions {
|
||||
reloadIgnoringCache?: boolean;
|
||||
}
|
||||
|
||||
interface WebContentsPrintOptions extends Electron.WebContentsPrintOptions {
|
||||
mediaSize?: MediaSize;
|
||||
}
|
||||
|
||||
type MediaSize = {
|
||||
name: string,
|
||||
custom_display_name: string,
|
||||
height_microns: number,
|
||||
width_microns: number,
|
||||
is_default?: 'true',
|
||||
}
|
||||
|
||||
type ModuleLoader = () => any;
|
||||
|
||||
interface ModuleEntry {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue