From 68bbccbaa25f6364254a19fa6ef88a4b04ac2cbb Mon Sep 17 00:00:00 2001 From: Radek Czemerys Date: Mon, 14 Aug 2017 11:56:22 -0700 Subject: [PATCH] Fix flowtype errors for PushNotificationIOS Summary: Flow syntax is wrong, instead of using `Array` author used syntax for [tuples](https://flow.org/en/docs/types/tuples/). Tested with flow 0.49.1. 1. Import `removeDeliveredNotifications` in your code and pass an array with more than one element. 2. Test with flow. Closes https://github.com/facebook/react-native/pull/15490 Differential Revision: D5622949 Pulled By: ericnakagawa fbshipit-source-id: f9ed35a178eebac1b26a6ec15c66dc14331f7d34 --- Libraries/PushNotificationIOS/PushNotificationIOS.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/PushNotificationIOS/PushNotificationIOS.js b/Libraries/PushNotificationIOS/PushNotificationIOS.js index 8b738b6e695..fc09fef39cc 100644 --- a/Libraries/PushNotificationIOS/PushNotificationIOS.js +++ b/Libraries/PushNotificationIOS/PushNotificationIOS.js @@ -201,7 +201,7 @@ class PushNotificationIOS { * - `userInfo` : An optional object containing additional notification data. * - `thread-id` : The thread identifier of this notification, if has one. */ - static getDeliveredNotifications(callback: (notifications: [Object]) => void): void { + static getDeliveredNotifications(callback: (notifications: Array) => void): void { RCTPushNotificationManager.getDeliveredNotifications(callback); } @@ -210,7 +210,7 @@ class PushNotificationIOS { * * @param identifiers Array of notification identifiers */ - static removeDeliveredNotifications(identifiers: [string]): void { + static removeDeliveredNotifications(identifiers: Array): void { RCTPushNotificationManager.removeDeliveredNotifications(identifiers); }