Skip to content

notification

Create OS desktop notifications.

Functions

notification.create

notification.create(options: NotificationOptions): Promise<boolean>

Create and display notification.

Example

import { _extension } from '@altdot/extension';
export default async function Command() {
await _extension.notification.create({
title: 'Hello world!!',
});
}

Types

notification.NotificationOptions

Data of the notification.

interface NotificationOptions {
title: string;
body?: string;
silent?: boolean;
}
PropertyTypeDescription
titlestringThe notification’s title
body?stringThe notification’s body
silent?booleanWhether or not to suppress the OS notification noise when showing the notification