1import { UnavailabilityError } from 'expo-modules-core'; 2 3import NotificationChannelManager from './NotificationChannelManager'; 4import { NotificationChannel } from './NotificationChannelManager.types'; 5 6export default async function getNotificationChannelsAsync(): Promise<NotificationChannel[]> { 7 if (!NotificationChannelManager.getNotificationChannelsAsync) { 8 throw new UnavailabilityError('Notifications', 'getNotificationChannelsAsync'); 9 } 10 return (await NotificationChannelManager.getNotificationChannelsAsync()) ?? []; 11} 12