expo-notifications
Version:
Provides an API to fetch push notification tokens and to present, schedule, receive, and respond to notifications.
16 lines (12 loc) • 466 B
text/typescript
import { requireNativeModule } from 'expo-modules-core';
import { BadgeModule } from './BadgeModule.types';
const nativeModule = requireNativeModule('ExpoBadgeModule');
export default {
...nativeModule,
// We overwrite setBadgeCountAsync to omit
// an obsolete options argument when calling
// the native function.
setBadgeCountAsync: async (badgeCount, options) => {
return await nativeModule.setBadgeCountAsync(badgeCount);
},
} as BadgeModule;