From 56f3f7254629de50f96ff8ef25a2690c5904a950 Mon Sep 17 00:00:00 2001 From: Mikael Brevik Date: Wed, 16 Sep 2020 19:07:01 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#46715=20feat:=20Up?= =?UTF-8?q?dates=20type=20definitions=20for=20node-notifier@8.0.0=20by=20@?= =?UTF-8?q?mikaelbr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/node-notifier/index.d.ts | 2 +- types/node-notifier/node-notifier-tests.ts | 24 ++++++++++++++++++- types/node-notifier/notifiers/notifysend.d.ts | 6 +++-- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/types/node-notifier/index.d.ts b/types/node-notifier/index.d.ts index 5129ddb707..9f1e28b411 100644 --- a/types/node-notifier/index.d.ts +++ b/types/node-notifier/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for node-notifier 6.0 +// Type definitions for node-notifier 8.0 // Project: https://github.com/mikaelbr/node-notifier // Definitions by: Qubo // Lorenzo Rapetti diff --git a/types/node-notifier/node-notifier-tests.ts b/types/node-notifier/node-notifier-tests.ts index 870510f403..4aac3e90a5 100644 --- a/types/node-notifier/node-notifier-tests.ts +++ b/types/node-notifier/node-notifier-tests.ts @@ -160,7 +160,29 @@ notifier6.notify({ icon: __dirname + '/coulson.jpg', // .. and other notify-send flags: urgency: void 0, - time: void 0, + timeout: void 0, + category: void 0, + hint: void 0, +}); + +notifier6.notify({ + title: 'Foo', + message: 'Hello World', + icon: __dirname + '/coulson.jpg', + wait: true, + // .. and other notify-send flags: + urgency: void 0, + category: void 0, + hint: void 0, +}); + +notifier6.notify({ + title: 'Foo', + message: 'Hello World', + icon: __dirname + '/coulson.jpg', + timeout: false, + // .. and other notify-send flags: + urgency: void 0, category: void 0, hint: void 0, }); diff --git a/types/node-notifier/notifiers/notifysend.d.ts b/types/node-notifier/notifiers/notifysend.d.ts index a2420d7eff..49cbbd9dcc 100644 --- a/types/node-notifier/notifiers/notifysend.d.ts +++ b/types/node-notifier/notifiers/notifysend.d.ts @@ -10,10 +10,12 @@ declare namespace NotifySend { title?: string; message?: string; icon?: string; + /** Shorthand for timeout 5 seconds if true. Timeout option overrides wait */ + wait?: boolean; /** Specifies the urgency level (low, normal, critical). */ urgency?: string; - /** Specifies the timeout in milliseconds at which to expire the notification */ - time?: number; + /** Specifies the timeout in seconds at which to expire the notification. Defaults to 10 seconds */ + timeout?: number | false; /** Specifies the notification category */ category?: string; /** Specifies basic extra data to pass. Valid types are int, double, string and byte. */