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. */