mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
[node-notifier]: add timeout: false option (#42303)
This commit is contained in:
4
types/node-notifier/index.d.ts
vendored
4
types/node-notifier/index.d.ts
vendored
@@ -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>
|
||||
@@ -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. */
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user