mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Merge pull request #16405 from vector-im/jryans/electron-type-merge
Fix Electron type merging
This commit is contained in:
commit
e562c54ddc
1 changed files with 7 additions and 5 deletions
12
src/@types/global.d.ts
vendored
12
src/@types/global.d.ts
vendored
|
@ -39,18 +39,20 @@ declare global {
|
|||
matrixChat: ReturnType<Renderer>;
|
||||
|
||||
// electron-only
|
||||
electron: {
|
||||
on(channel: ElectronChannel, listener: (event: Event, ...args: any[]) => void): void;
|
||||
send(channel: ElectronChannel, ...args: any[]): void;
|
||||
}
|
||||
electron?: Electron;
|
||||
|
||||
// opera-only
|
||||
opera: any;
|
||||
opera?: any;
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/InstallTrigger
|
||||
InstallTrigger: any;
|
||||
}
|
||||
|
||||
interface Electron {
|
||||
on(channel: ElectronChannel, listener: (event: Event, ...args: any[]) => void): void;
|
||||
send(channel: ElectronChannel, ...args: any[]): void;
|
||||
}
|
||||
|
||||
interface Navigator {
|
||||
// PWA badging extensions https://w3c.github.io/badging/
|
||||
setAppBadge?(count: number): Promise<void>;
|
||||
|
|
Loading…
Reference in a new issue