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
12 lines (9 loc) • 537 B
text/typescript
import { UnavailabilityError } from 'expo-modules-core';
import NotificationChannelManager from './NotificationChannelManager';
import { NotificationChannel } from './NotificationChannelManager.types';
export default async function getNotificationChannelsAsync(): Promise<NotificationChannel[]> {
if (!NotificationChannelManager.getNotificationChannelsAsync) {
throw new UnavailabilityError('Notifications', 'getNotificationChannelsAsync');
}
return (await NotificationChannelManager.getNotificationChannelsAsync()) ?? [];
}