notifications.cancel
Takes back the notification with this id, whether it is pending or shown.
Usage
Schedule and cancel a reminder
import { notifications, permissions } from 'kuito';
const { status } = await permissions.request('notifications');
if (status === 'granted') {
const id = await notifications.schedule({
title: 'Stand-up',
body: 'In five minutes',
url: 'myapp://meetings/standup',
at: new Date(Date.now() + 5 * 60_000),
});
// Changed your mind:
await notifications.cancel(id);
}Signatures
(id: string): Promise<void>Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
Returns
Promise<void>
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.