🤖 Merge PR #46715 feat: Updates type definitions for node-notifier@8.0.0 by @mikaelbr

This commit is contained in:
Mikael Brevik 2020-09-16 19:07:01 +02:00 committed by GitHub
parent a91e62e200
commit 56f3f72546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 4 deletions

View File

@ -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 <https://github.com/tkQubo>
// Lorenzo Rapetti <https://github.com/loryman>

View File

@ -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,
});

View File

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