ScheduledNotification
A notification notifications.schedule shows.
Utilisation
Schedule a local reminder.
Ce type est utilisé par 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' });Déclaration du type
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;
};Membres 5
| Nom | Type | Requis | Description |
|---|---|---|---|
id | string | Non | Replaces the pending or shown notification with this id. Absent, the platform makes one. |
title | string | Oui | — |
body | string | Non | — |
url | string | Non | 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 | Non | When it shows: a Date, or milliseconds since the epoch. Absent, it shows now. |
Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.