expo-notifications
Version:
Provides an API to fetch push notification tokens and to present, schedule, receive, and respond to notifications.
19 lines (15 loc) • 695 B
text/typescript
import { UnavailabilityError } from 'expo-modules-core';
import NotificationChannelGroupManager from './NotificationChannelGroupManager';
import {
NotificationChannelGroup,
NotificationChannelGroupInput,
} from './NotificationChannelGroupManager.types';
export default async function setNotificationChannelGroupAsync(
groupId: string,
group: NotificationChannelGroupInput
): Promise<NotificationChannelGroup | null> {
if (!NotificationChannelGroupManager.setNotificationChannelGroupAsync) {
throw new UnavailabilityError('Notifications', 'setNotificationChannelGroupAsync');
}
return await NotificationChannelGroupManager.setNotificationChannelGroupAsync(groupId, group);
}