mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-06 13:53:54 +02:00
chore(api): update @since tag to 2.0.0 (#395)
This commit is contained in:
committed by
GitHub
parent
7e3034904c
commit
9bf98f68e7
@@ -18,7 +18,7 @@ import {
|
||||
/**
|
||||
* Options to send a notification.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @since 2.0.0
|
||||
*/
|
||||
interface Options {
|
||||
/**
|
||||
@@ -300,7 +300,7 @@ type Permission = "granted" | "denied" | "default";
|
||||
* const permissionGranted = await isPermissionGranted();
|
||||
* ```
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @since 2.0.0
|
||||
*/
|
||||
async function isPermissionGranted(): Promise<boolean> {
|
||||
if (window.Notification.permission !== "default") {
|
||||
@@ -323,7 +323,7 @@ async function isPermissionGranted(): Promise<boolean> {
|
||||
*
|
||||
* @returns A promise resolving to whether the user granted the permission or not.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @since 2.0.0
|
||||
*/
|
||||
async function requestPermission(): Promise<Permission> {
|
||||
return window.Notification.requestPermission();
|
||||
@@ -345,7 +345,7 @@ async function requestPermission(): Promise<Permission> {
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @since 2.0.0
|
||||
*/
|
||||
function sendNotification(options: Options | string): void {
|
||||
if (typeof options === "string") {
|
||||
|
||||
Reference in New Issue
Block a user