UNPKG

@capawesome/capacitor-badge

Version:

Capacitor plugin to access and update the badge number of the app icon.

22 lines (21 loc) 789 B
import { WebPlugin } from '@capacitor/core'; import type { BadgePlugin, GetBadgeResult, IsSupportedResult, PermissionStatus, SetBadgeOptions } from './definitions'; export declare class BadgeWeb extends WebPlugin implements BadgePlugin { private static STORAGE_KEY; constructor(); checkPermissions(): Promise<PermissionStatus>; requestPermissions(): Promise<PermissionStatus>; get(): Promise<GetBadgeResult>; set(options: SetBadgeOptions): Promise<void>; increase(): Promise<void>; decrease(): Promise<void>; clear(): Promise<void>; isSupported(): Promise<IsSupportedResult>; private restore; } declare global { interface Navigator { setAppBadge: (count: number) => Promise<void>; clearAppBadge: () => Promise<void>; } }