Merge pull request #16405 from vector-im/jryans/electron-type-merge

Fix Electron type merging
pull/16408/head
J. Ryan Stinnett 2021-02-08 15:25:19 +00:00 committed by GitHub
commit e562c54ddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -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>;