mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-10 11:40:16 +08:00
Merge branch 'master' into patch-5
This commit is contained in:
@@ -14,7 +14,7 @@ function test_Notify_constructor() {
|
||||
body : "fuga",
|
||||
icon : "./logo.png",
|
||||
tag : "user",
|
||||
timeout : 1000,
|
||||
timeout: 2,
|
||||
notifyShow : (e:Event)=> console.log("notifyShow", e),
|
||||
notifyClose : ()=> console.log("notifyClose"),
|
||||
notifyClick : ()=> console.log("notifyClick"),
|
||||
@@ -27,9 +27,10 @@ function test_Notify_constructor() {
|
||||
}
|
||||
|
||||
function test_Notify_static_methods() {
|
||||
Notify.needsPermission();
|
||||
Notify.needsPermission;
|
||||
Notify.requestPermission();
|
||||
Notify.requestPermission(()=> console.log("onPermissionGrantedCallback"));
|
||||
Notify.requestPermission(()=> console.log("onPermissionGrantedCallback"), ()=> console.log("onPermissionDeniedCallback"));
|
||||
Notify.isSupported();
|
||||
Notify.isSupported;
|
||||
Notify.permissionLevel;
|
||||
}
|
||||
|
||||
Vendored
+2
-1
@@ -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
|
||||
@@ -27,6 +27,7 @@ declare var Notify: {
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user