Verwendung

Schedule and cancel a reminder

tsx
import { notifications, permissions } from 'kuito';

const { status } = await permissions.request('notifications');

if (status === 'granted') {
  const id = await notifications.schedule({
    title: 'Stand-up',
    body: 'In five minutes',
    url: 'myapp://meetings/standup',
    at: new Date(Date.now() + 5 * 60_000),
  });

  // Changed your mind:
  await notifications.cancel(id);
}

Signaturen

ts
(id: string): Promise<void>

Parameter

NameTypErforderlichBeschreibung
idstringJa—

Rückgabe

Promise<void>

Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.