@elemental-design/expo-notifications
Version:
12 lines (8 loc) • 462 B
text/typescript
import { UnavailabilityError } from '@unimodules/core';
import NotificationScheduler from './NotificationScheduler';
export default async function cancelScheduledNotificationAsync(identifier: string): Promise<void> {
if (!NotificationScheduler.cancelScheduledNotificationAsync) {
throw new UnavailabilityError('Notifications', 'cancelScheduledNotificationAsync');
}
return await NotificationScheduler.cancelScheduledNotificationAsync(identifier);
}