feat: remove getCurrentWindowId IPC event and related functionality for cleaner API
This commit is contained in:
6
global.d.ts
vendored
6
global.d.ts
vendored
@@ -14,11 +14,6 @@ declare global {
|
||||
params: [window: number]
|
||||
return: {success: boolean, error?: string}
|
||||
}
|
||||
[IPC_EVENTS.GET_WINDOW_ID]: {
|
||||
params: []
|
||||
return: number
|
||||
}
|
||||
|
||||
// 异步通信
|
||||
[IPC_EVENTS.FILE_READ]: {
|
||||
params: [filePath: string]
|
||||
@@ -138,7 +133,6 @@ declare global {
|
||||
invokeAsync<T extends keyof IPCTypings>(channel: T, ...args: IPCTypings[T]['params']): IPCTypings[T]['return'],
|
||||
on<T extends keyof IPCTypings>(channel: T, callback: (...args: IPCTypings[T]['params']) => void): () => void
|
||||
send<T extends keyof IPCTypings>(channel: T, ...args: IPCTypings[T]['params']): void,
|
||||
getCurrentWindowId(): number,
|
||||
versions: NodeJS.ProcessVersions,
|
||||
external: {
|
||||
open: (url: string) => Promise<void>
|
||||
|
||||
Reference in New Issue
Block a user