Skip to content

Commit

Permalink
feat(permissions): remove deprecated PushPermissionState (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Nov 1, 2023
1 parent 37e1e4e commit ac19010
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/permissions/src/utils/permissions-predicates.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
export function isGranted(
state: PermissionState | NotificationPermission | PushPermissionState,
state: NotificationPermission | PermissionState,
): state is 'granted' {
return state === 'granted';
}

export function isDenied(
state: PermissionState | NotificationPermission | PushPermissionState,
state: NotificationPermission | PermissionState,
): state is 'denied' {
return state === 'denied';
}

export function isPrompt(s: NotificationPermission): s is 'default';
export function isPrompt(s: PermissionState | PushPermissionState): s is 'prompt';
export function isPrompt(s: PermissionState): s is 'prompt';
export function isPrompt(
state: PermissionState | NotificationPermission | PushPermissionState,
state: PermissionState | NotificationPermission,
): state is 'prompt' | 'default' {
return state === 'prompt' || state === 'default';
}

0 comments on commit ac19010

Please sign in to comment.