Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Add type overload on Push.Permission.request().
Browse files Browse the repository at this point in the history
  - commit without builds.
  • Loading branch information
Jean-Christophe Maigrot committed Feb 19, 2020
1 parent 72e7115 commit 039be5c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ declare module 'push.js' {
class Push {
Permission: PushPermission;

create(title: string, params?: PushNotificationParams): Promise<PushNotification>
create(title: string, params?: PushNotificationParams): Promise<PushNotification>;

close(tag: string): void;

Expand Down Expand Up @@ -38,7 +38,8 @@ declare module 'push.js' {
GRANTED: string;
DENIED: string;

request(onGranted?: Function, onDenied?: Function): void;
request(): Promise<void>;
request(onGranted: () => void, onDenied?: () => void): void;

has(): boolean;

Expand Down

0 comments on commit 039be5c

Please sign in to comment.