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
This commit is contained in:
Radek Czemerys 2017-08-14 11:56:22 -07:00 committed by Facebook Github Bot
parent ef23d2bdcf
commit 68bbccbaa2
1 changed files with 2 additions and 2 deletions

View File

@ -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<Object>) => 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<string>): void {
RCTPushNotificationManager.removeDeliveredNotifications(identifiers);
}