UNPKG

expo-notifications

Version:

Provides an API to fetch push notification tokens and to present, schedule, receive, and respond to notifications.

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); }