mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 10:35:22 +08:00
13 lines
503 B
TypeScript
13 lines
503 B
TypeScript
/// <reference path="./electron-notifications.d.ts" />
|
|
|
|
import * as notifier from 'electron-notifications';
|
|
|
|
const data: ElectronNotifications.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}`) }); |