mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
11 lines
434 B
TypeScript
11 lines
434 B
TypeScript
import * as notifier from 'electron-notifications';
|
|
|
|
const data: notifier.NotifierOptions = {
|
|
message: 'message',
|
|
icon: 'icon',
|
|
buttons: ['ok', 'cancel']
|
|
};
|
|
const notification = notifier.notify('title', data);
|
|
notification.on('clicked', () => { console.log('clicked') });
|
|
notification.on('swipedRight', () => { console.log('swipedRight') });
|
|
notification.on('buttonClicked', (text) => { console.log(`buttonClicked: ${text}`) }); |