@elemental-design/expo-notifications
Version:
13 lines (9 loc) • 490 B
text/typescript
import { UnavailabilityError } from '@unimodules/core';
import NotificationPresenter from './NotificationPresenter';
import { Notification } from './Notifications.types';
export default async function getPresentedNotificationsAsync(): Promise<Notification[]> {
if (!NotificationPresenter.getPresentedNotificationsAsync) {
throw new UnavailabilityError('Notifications', 'getPresentedNotificationsAsync');
}
return await NotificationPresenter.getPresentedNotificationsAsync();
}