UNPKG

expo-quest-notifications

Version:

A fork of [`expo-notifications`](https://github.com/expo/expo/tree/main/packages/expo-notifications) that provides two implementations: - The default `expo-notifications` for Android and iOS platforms. - A Meta Quest-compatible implementation that uses th

17 lines (13 loc) 692 B
import { UnavailabilityError } from 'expo-modules-core'; import NotificationPresenter from './NotificationPresenterModule'; /** * Removes all application's notifications displayed in the notification tray (Notification Center). * @return A Promise which resolves once the request to dismiss the notifications is successfully dispatched to the notifications manager. * @header dismiss */ export default async function dismissAllNotificationsAsync(): Promise<void> { if (!NotificationPresenter.dismissAllNotificationsAsync) { throw new UnavailabilityError('Notifications', 'dismissAllNotificationsAsync'); } return await NotificationPresenter.dismissAllNotificationsAsync(); }