ScheduledNotification
A notification notifications.schedule shows.
Verwendung
Schedule a local reminder.
Dieser Typ wird verwendet von notifications.schedule
// 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
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
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
id | string | Nein | Replaces the pending or shown notification with this id. Absent, the platform makes one. |
title | string | Ja | — |
body | string | Nein | — |
url | string | Nein | The link a tap opens, as if it had opened the app: a <Router linking>
follows it to its route (docs/notifications.md#taps). |
at | number | Date | Nein | When 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.