UNPKG

expo-notifications

Version:

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

12 lines (9 loc) 576 B
import { UnavailabilityError } from 'expo-modules-core'; import NotificationChannelGroupManager from './NotificationChannelGroupManager'; import { NotificationChannelGroup } from './NotificationChannelGroupManager.types'; export async function getNotificationChannelGroupsAsync(): Promise<NotificationChannelGroup[]> { if (!NotificationChannelGroupManager.getNotificationChannelGroupsAsync) { throw new UnavailabilityError('Notifications', 'getNotificationChannelGroupsAsync'); } return await NotificationChannelGroupManager.getNotificationChannelGroupsAsync(); }