ScheduledNotification
A notification notifications.schedule shows.
Utilização
Schedule a local reminder.
Este tipo é usado por 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' });Declaração do tipo
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;
};Membros 5
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
id | string | Não | Replaces the pending or shown notification with this id. Absent, the platform makes one. |
title | string | Sim | — |
body | string | Não | — |
url | string | Não | 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 | Não | When it shows: a Date, or milliseconds since the epoch. Absent, it shows now. |
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.