UNPKG

expo-notifications

Version:
14 lines (11 loc) 560 B
import { UnavailabilityError } from 'expo-modules-core'; import NotificationChannelManager from './NotificationChannelManager'; import { NotificationChannel } from './NotificationChannelManager.types'; export default async function getNotificationChannelAsync( channelId: string ): Promise<NotificationChannel | null> { if (!NotificationChannelManager.getNotificationChannelAsync) { throw new UnavailabilityError('Notifications', 'getNotificationChannelAsync'); } return await NotificationChannelManager.getNotificationChannelAsync(channelId); }