UNPKG

expo-quest-notifications

Version:

A fork of [`expo-notifications`](https://github.com/expo/expo/tree/main/packages/expo-notifications) that provides two implementations: - The default `expo-notifications` for Android and iOS platforms. - A Meta Quest-compatible implementation that uses th

16 lines (12 loc) 633 B
import { UnavailabilityError } from 'expo-modules-core'; import NotificationChannelManager from './NotificationChannelManager'; import { NotificationChannelInput, NotificationChannel } from './NotificationChannelManager.types'; export default async function setNotificationChannelAsync( channelId: string, channel: NotificationChannelInput ): Promise<NotificationChannel | null> { if (!NotificationChannelManager.setNotificationChannelAsync) { throw new UnavailabilityError('Notifications', 'setNotificationChannelAsync'); } return await NotificationChannelManager.setNotificationChannelAsync(channelId, channel); }