From 5731645defa0e37ea62724cead62be8ac2037494 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 12 Feb 2020 11:54:33 +0100 Subject: [PATCH] [node-notifier]: add `timeout: false` option --- types/node-notifier/index.d.ts | 4 ++-- types/node-notifier/node-notifier-tests.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/types/node-notifier/index.d.ts b/types/node-notifier/index.d.ts index 7846a9b24683cc..db3fe7f97558f2 100644 --- a/types/node-notifier/index.d.ts +++ b/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 // Lorenzo Rapetti @@ -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. */ diff --git a/types/node-notifier/node-notifier-tests.ts b/types/node-notifier/node-notifier-tests.ts index 6162196c865a8b..d5b49e5f73971e 100644 --- a/types/node-notifier/node-notifier-tests.ts +++ b/types/node-notifier/node-notifier-tests.ts @@ -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