mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 21:58:03 +00:00
feat: updates
This commit is contained in:
parent
fc1c25f404
commit
7b6579e068
48 changed files with 1155 additions and 777 deletions
22
src/renderer/global.d.ts
vendored
22
src/renderer/global.d.ts
vendored
|
|
@ -1,17 +1,25 @@
|
|||
import { IpcChannels } from '@/main/IpcChannelsName'
|
||||
import { IpcChannelsParams, IpcChannelsReturns } from '@/shared/IpcChannels'
|
||||
import { ElectronLog } from 'electron-log'
|
||||
|
||||
export {}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
// Expose some Api through preload script
|
||||
ipcRenderer?: {
|
||||
sendSync: (channel: IpcChannels, ...args: any[]) => any
|
||||
send: (channel: IpcChannels, ...args: any[]) => void
|
||||
on: (
|
||||
channel: IpcChannels,
|
||||
listener: (event: Electron.IpcRendererEvent, ...args: any[]) => void
|
||||
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?: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue