aboutsummaryrefslogtreecommitdiffstats
path: root/src/preload/index.d.ts
blob: 99f64a5f31a0f0cc5870fcab697e027e8f47c7b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
declare global {
  interface Window {
    electron: {
      ipcRenderer: {
        send: (channel: string, data?: unknown) => void
        on: (channel: string, func: (...args: unknown[]) => void) => void
        removeListener: (channel: string, func: (...args: unknown[]) => void) => void
      }
      config: {
        getChannelNicknames: () => Promise<Record<string, string>>
        setChannelNickname: (channelId: string, nickname: string) => Promise<boolean>
        removeChannelNickname: (channelId: string) => Promise<boolean>
        getChannelList: () => Promise<Array<{ id: string; nickname: string }>>
        getMaxMessages: () => Promise<number>
        setMaxMessages: (maxMessageNum: number) => Promise<boolean>
      }
    }
  }
}

export {}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage