Utilização

Schedule a local reminder.

Este tipo é usado por 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' });

Declaração do tipo

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;
};

Membros 5

NomeTipoObrigatórioDescrição
idstringNãoReplaces the pending or shown notification with this id. Absent, the platform makes one.
titlestringSim—
bodystringNão—
urlstringNãoThe link a tap opens, as if it had opened the app: a <Router linking> follows it to its route (docs/notifications.md#taps).
atnumber | DateNãoWhen 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.