Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[node-notifier]: add timeout: false option #42303

Merged
merged 1 commit into from Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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