mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Update events
This commit is contained in:
@@ -17,7 +17,10 @@ eNotify.notify({
|
||||
image: 'path/to/image.png',
|
||||
url: 'http://google.de',
|
||||
sound: 'notification.wav',
|
||||
onClickFunc: function () { console.log('onClick') },
|
||||
onShowFunc: function () { console.log('onShow') },
|
||||
onCloseFunc: function () { console.log('onClose') }
|
||||
onClickFunc: (event) => {
|
||||
console.log('onClick ' + event.id);
|
||||
event.closeNotification('onClick');
|
||||
},
|
||||
onShowFunc: (event) => { console.log('onShow ' + event.id) },
|
||||
onCloseFunc: (event) => { console.log('onClose ' + event.id) }
|
||||
});
|
||||
15
electron-notify/electron-notify.d.ts
vendored
15
electron-notify/electron-notify.d.ts
vendored
@@ -7,15 +7,24 @@
|
||||
|
||||
declare namespace ElectronNotify {
|
||||
|
||||
interface ICloseNotificationEvent {
|
||||
event: 'close' | 'show' | 'click',
|
||||
id: number
|
||||
}
|
||||
|
||||
interface INotificationEvent extends ICloseNotificationEvent {
|
||||
closeNotification: (reason: any) => void,
|
||||
}
|
||||
|
||||
interface INotification {
|
||||
title: string,
|
||||
text?: string,
|
||||
image?: string,
|
||||
url?: string,
|
||||
sound?: string,
|
||||
onClickFunc?: (event: string, id: number, closeNotification: any) => void,
|
||||
onShowFunc?: (event: string, id: number, closeNotification: any) => void,
|
||||
onCloseFunc?: (event: string, id: number) => void
|
||||
onClickFunc?: (event: INotificationEvent) => void,
|
||||
onShowFunc?: (event: INotificationEvent) => void,
|
||||
onCloseFunc?: (event: ICloseNotificationEvent) => void
|
||||
}
|
||||
|
||||
interface IConfiguration {
|
||||
|
||||
Reference in New Issue
Block a user