Verwendung

Schedule a local reminder.

Dieser Typ wird verwendet von notifications.schedule

tsx
// Schedule a local reminder.
import { notifications, permissions } from 'kuito';

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

if (status === 'granted')
  await notifications.schedule({ title: 'Your order shipped', url: 'shop://orders/42' });

Typdeklaration

ts
export type ScheduledNotification = {
  /** Replaces the pending or shown notification with this id. Absent, the platform makes one. */
  id?: string;
  title: string;
  body?: string;
  /**
   * The link a tap opens, as if it had opened the app: a `<Router linking>`
   * follows it to its route (docs/notifications.md#taps).
   */
  url?: string;
  /** When it shows: a Date, or milliseconds since the epoch. Absent, it shows now. */
  at?: Date | number;
};

Mitglieder 5

NameTypErforderlichBeschreibung
idstringNeinReplaces the pending or shown notification with this id. Absent, the platform makes one.
titlestringJa—
bodystringNein—
urlstringNeinThe link a tap opens, as if it had opened the app: a <Router linking> follows it to its route (docs/notifications.md#taps).
atnumber | DateNeinWhen it shows: a Date, or milliseconds since the epoch. Absent, it shows now.
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.