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
15 lines • 827 B
JavaScript
import { UnavailabilityError } from 'expo-modules-core';
import NotificationScheduler from './NotificationScheduler';
import { mapNotificationRequest } from './utils/mapNotificationResponse';
/**
* Fetches information about all scheduled notifications.
* @return Returns a Promise resolving to an array of objects conforming to the [`Notification`](#notification) interface.
* @header schedule
*/
export default async function getAllScheduledNotificationsAsync() {
if (!NotificationScheduler.getAllScheduledNotificationsAsync) {
throw new UnavailabilityError('Notifications', 'getAllScheduledNotificationsAsync');
}
return (await NotificationScheduler.getAllScheduledNotificationsAsync()).map((request) => mapNotificationRequest(request));
}
//# sourceMappingURL=getAllScheduledNotificationsAsync.js.map