mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2025-02-28 21:19:47 +08:00
39 lines
919 B
TypeScript
39 lines
919 B
TypeScript
import { IpcChannelsParams, IpcChannelsReturns } from '@/shared/IpcChannels'
|
|
import { ElectronLog } from 'electron-log'
|
|
|
|
export {}
|
|
|
|
declare global {
|
|
interface Window {
|
|
ipcRenderer?: {
|
|
sendSync: <T extends keyof IpcChannelsParams>(
|
|
channel: T,
|
|
params?: IpcChannelsParams[T]
|
|
) => IpcChannelsReturns[T]
|
|
send: <T extends keyof IpcChannelsParams>(
|
|
channel: T,
|
|
params?: IpcChannelsParams[T]
|
|
) => void
|
|
on: <T extends keyof IpcChannelsParams>(
|
|
channel: T,
|
|
listener: (
|
|
event: Electron.IpcRendererEvent,
|
|
value: IpcChannelsReturns[T]
|
|
) => void
|
|
) => void
|
|
}
|
|
env?: {
|
|
isElectron: boolean
|
|
isEnableTitlebar: boolean
|
|
isLinux: boolean
|
|
isMac: boolean
|
|
isWindows: boolean
|
|
}
|
|
log?: ElectronLog
|
|
}
|
|
}
|
|
|
|
declare module 'valtio' {
|
|
function useSnapshot<T extends object>(p: T): T
|
|
}
|