Skip to main content

Table of contents

Interfaces#

Type aliases#

PartialOptions#

Ƭ PartialOptions: Omit<Options, title>

Defined in: notification.ts:13


Permission#

Ƭ Permission: granted | denied | default

Defined in: notification.ts:14

Functions#

isPermissionGranted#

isPermissionGranted(): Promise<boolean | null>

Checks if the permission to send notifications is granted.

Returns: Promise<boolean | null>

Defined in: notification.ts:21


requestPermission#

requestPermission(): Promise<Permission>

Requests the permission to send notifications.

Returns: Promise<Permission>

A promise resolving to whether the user granted the permission or not.

Defined in: notification.ts:38


sendNotification#

sendNotification(options: Options | string): void

Sends a notification to the user.

Parameters:#

NameTypeDescription
optionsOptions | stringNotification options

Returns: void

Defined in: notification.ts:48