1import { UnavailabilityError } from '@unimodules/core'; 2 3import NotificationChannelManager, { 4 NotificationChannelInput, 5 NotificationChannel, 6} from './NotificationChannelManager'; 7 8export default async function setNotificationChannelAsync( 9 channelId: string, 10 channel: NotificationChannelInput 11): Promise<NotificationChannel | null> { 12 if (!NotificationChannelManager.setNotificationChannelAsync) { 13 throw new UnavailabilityError('Notifications', 'setNotificationChannelAsync'); 14 } 15 16 return await NotificationChannelManager.setNotificationChannelAsync(channelId, channel); 17} 18