mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
25 lines
561 B
TypeScript
25 lines
561 B
TypeScript
export type Platform = "win32" | "darwin" | "linux"
|
|
|
|
export interface NotificationShowOptions {
|
|
title: string;
|
|
body: string;
|
|
icon?: string;
|
|
tag?: string;
|
|
}
|
|
|
|
export interface ElectronNotifications {
|
|
requestPermission: () => Promise<NotificationPermission>;
|
|
show: (options: NotificationShowOptions) => Promise<boolean>;
|
|
}
|
|
|
|
export interface ElectronInterface {
|
|
desktop: true,
|
|
platform: Platform,
|
|
notifications: ElectronNotifications
|
|
}
|
|
|
|
declare global {
|
|
interface Window {
|
|
electronInterface: ElectronInterface
|
|
}
|
|
} |