[node-notifier]: add timeout: false option (#42303)

This commit is contained in:
Simen Bekkhus
2020-02-26 20:34:24 +01:00
committed by GitHub
parent cd414cbf2f
commit d2cb704742
2 changed files with 6 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
// Type definitions for node-notifier 5.4.0
// Type definitions for node-notifier 6.0
// Project: https://github.com/mikaelbr/node-notifier
// Definitions by: Qubo <https://github.com/tkQubo>
// Lorenzo Rapetti <https://github.com/loryman>
@@ -100,7 +100,7 @@ declare module "node-notifier/notifiers/notificationcenter" {
* The amount of seconds before the notification closes.
* Takes precedence over wait if both are defined.
*/
timeout?: number;
timeout?: number | false;
/** Label for cancel button */
closeLabel?: string;
/** Action label or list of labels in case of dropdown. */

View File

@@ -15,6 +15,10 @@ notifier.notify({
}, function (err: any, response: any) {
// response is response from notification
});
notifier.notify({
message: 'Hello from node, Mr. User!',
timeout: false
});
notifier.on('click', function (notifierObject: any, options: any) {
// Happens if `wait: true` and user clicks notification