Skip to content

Commit

Permalink
[node-notifier]: add timeout: false option (#42303)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 26, 2020
1 parent cd414cb commit d2cb704
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/node-notifier/index.d.ts
@@ -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>
Expand Down Expand Up @@ -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. */
Expand Down
4 changes: 4 additions & 0 deletions types/node-notifier/node-notifier-tests.ts
Expand Up @@ -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
Expand Down

0 comments on commit d2cb704

Please sign in to comment.