()
| 15 | "PushManager" in window; |
| 16 | |
| 17 | const currentPermission = (): IWebPushPermission => { |
| 18 | if (!isApiSupported()) { |
| 19 | return "default"; |
| 20 | } |
| 21 | |
| 22 | const granted = Notification.permission; |
| 23 | |
| 24 | if (granted === "granted" || granted === "denied") { |
| 25 | return granted; |
| 26 | } |
| 27 | |
| 28 | return "default"; |
| 29 | }; |
| 30 | |
| 31 | const normalizePermission = ( |
| 32 | value: NotificationPermission |
nothing calls this directly
no test coverage detected