From 039be5cfdfd17c0d55f498b2372613857e285ac0 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Maigrot Date: Wed, 19 Feb 2020 11:11:21 +0100 Subject: [PATCH] Add type overload on Push.Permission.request(). - commit without builds. --- index.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 1fe2e610..446dfe66 100644 --- a/index.d.ts +++ b/index.d.ts @@ -6,7 +6,7 @@ declare module 'push.js' { class Push { Permission: PushPermission; - create(title: string, params?: PushNotificationParams): Promise + create(title: string, params?: PushNotificationParams): Promise; close(tag: string): void; @@ -38,7 +38,8 @@ declare module 'push.js' { GRANTED: string; DENIED: string; - request(onGranted?: Function, onDenied?: Function): void; + request(): Promise; + request(onGranted: () => void, onDenied?: () => void): void; has(): boolean;