mirror of https://github.com/vector-im/riot-web
Fix Electron type merging
This changes to an interface for Electron types so that other layers can merge in further APIs as needed, such as the JS SDK.pull/16405/head
parent
816ea3d904
commit
993c2e50b5
|
@ -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 New Issue