( value: NotificationPermission )
| 29 | }; |
| 30 | |
| 31 | const normalizePermission = ( |
| 32 | value: NotificationPermission |
| 33 | ): IWebPushPermission => { |
| 34 | if (value === "granted") { |
| 35 | return "granted"; |
| 36 | } |
| 37 | |
| 38 | if (value === "denied") { |
| 39 | return "denied"; |
| 40 | } |
| 41 | |
| 42 | return "default"; |
| 43 | }; |
| 44 | |
| 45 | interface ISerializedSubscription { |
| 46 | readonly endpoint: string; |