-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathwindow.d.ts
More file actions
53 lines (51 loc) · 2.03 KB
/
window.d.ts
File metadata and controls
53 lines (51 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { AxiosRequestConfig, AxiosResponse } from 'axios'
import { Track } from './src/renderer/api/interfaces/track.interface'
interface DesktopEvents {
emit(channel: string, ...args: any[]): void
send(channel: string, ...args: any[]): void
on(channel: string, listener: (event: any, ...args: any[]) => void): () => void
once(channel: string, listener: (event: any, ...args: any[]) => void): void
removeListener(channel: string, listener: (event: any, ...args: any[]) => void): void
removeAllListeners(channel: string): void
invoke(channel: string, ...args: any[]): Promise<any>
}
declare global {
interface Window {
__listenersAdded?: boolean
electron: {
store: {
get: (key: string) => any
set: (key: string, val: any) => void
delete: (key: string) => void
}
window: {
maximize: () => void
minimize: () => void
close: (val: boolean) => void
exit: () => void
isMaximized: () => Promise<boolean>
}
player: {
setTrack: (track: Track, currentPercent: number) => void
setPlaying: (value: boolean) => void
}
request: (url: string, config: AxiosRequestConfig) => AxiosResponse
authorize: () => string
version: () => string
receive: (channel: string, func: (event: any, ...arg: any[]) => void) => void
receiveOnce: (channel: string, func: (event: any, ...arg: any[]) => void) => void
removeListener: (channel: string) => void
isAppDev: () => boolean
isLinux: () => boolean
isMac: () => boolean
}
refreshAddons: () => void
getModInfo: (args?: any, options?: { manual?: boolean; silentNotInstalled?: boolean }) => void
desktopEvents: DesktopEvents
appInfo: {
getBranch: () => string
getVersion: () => string
}
}
}
export {}