mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Adding missing timeout property, changing others to be properties instead of functions, spelling fixes
This commit is contained in:
Vendored
+18
-7
@@ -1,4 +1,4 @@
|
||||
// Type definitions for notify.js 1.2.0
|
||||
// Type definitions for notify.js 1.2.3
|
||||
// Project: https://github.com/alexgibson/notify.js
|
||||
// Definitions by: soundTricker <https://github.com/soundTricker>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -10,20 +10,26 @@ declare var Notify: {
|
||||
* Check is permission is needed for the user to receive notifications.
|
||||
* @return true : needs permission, false : does not need
|
||||
*/
|
||||
needsPermission() : boolean;
|
||||
needsPermission : boolean;
|
||||
|
||||
/**
|
||||
* Asks the user for permission to display notifications
|
||||
* @param onPermissionGrantedCallback A callback for permmision is granted.
|
||||
* @param onPermissionDeniedCallback A callback for permmision is denied.
|
||||
* @param onPermissionGrantedCallback A callback for permission is granted.
|
||||
* @param onPermissionDeniedCallback A callback for permission is denied.
|
||||
*/
|
||||
requestPermission(onPermissionGrantedCallback?: ()=> any, onPermissionDeniedCallback? : ()=> any) : void;
|
||||
|
||||
/**
|
||||
* return true if the browser supports HTML5 Notification
|
||||
* @param true : the browser supports HTML5 Notification, false ; the browswer does not supports HTML5 Notification.
|
||||
* @param true : the browser supports HTML5 Notification, false ; the browser does not supports HTML5 Notification.
|
||||
*/
|
||||
isSupported() : boolean;
|
||||
isSupported: boolean;
|
||||
|
||||
/**
|
||||
* shows the user's current permission level (granted, denied or default), returns null if notifications are not supported.
|
||||
* @return 'granted' : permission has been given, 'denied' : permission has been denied, 'default' : permission has not yet been set, null : notifications are not supported
|
||||
*/
|
||||
permissionLevel: string;
|
||||
}
|
||||
|
||||
declare module notifyjs {
|
||||
@@ -72,6 +78,11 @@ declare module notifyjs {
|
||||
* unique identifier to stop duplicate notifications
|
||||
*/
|
||||
tag? : string;
|
||||
|
||||
/**
|
||||
* number of seconds to close the notification automatically
|
||||
*/
|
||||
timeout? : number;
|
||||
|
||||
/**
|
||||
* callback when notification is shown
|
||||
@@ -98,4 +109,4 @@ declare module notifyjs {
|
||||
*/
|
||||
permissionDenied? : Function;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user