feat: updates

This commit is contained in:
qier222 2022-04-16 21:14:03 +08:00
parent fc1c25f404
commit 7b6579e068
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
48 changed files with 1155 additions and 777 deletions

View file

@ -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?: {