Pārlūkot izejas kodu

Wrap check / requestNotifications to avoid mocking

Mathieu Acthernoene 5 gadus atpakaļ
vecāks
revīzija
8310b03822
1 mainītis faili ar 9 papildinājumiem un 2 dzēšanām
  1. 9
    2
      src/index.ts

+ 9
- 2
src/index.ts Parādīt failu

@@ -211,8 +211,15 @@ export async function request(
211 211
   return RESULTS.UNAVAILABLE;
212 212
 }
213 213
 
214
-export const checkNotifications = RNPermissions.checkNotifications;
215
-export const requestNotifications = RNPermissions.requestNotifications;
214
+export function checkNotifications(): Promise<NotificationsResponse> {
215
+  return RNPermissions.checkNotifications();
216
+}
217
+
218
+export function requestNotifications(
219
+  options: NotificationOption[],
220
+): Promise<NotificationsResponse> {
221
+  return RNPermissions.requestNotifications(options);
222
+}
216 223
 
217 224
 export default {
218 225
   PERMISSIONS,