Permalink
Browse files

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 #15490

Differential Revision: D5622949

Pulled By: ericnakagawa

fbshipit-source-id: f9ed35a178eebac1b26a6ec15c66dc14331f7d34
  • Loading branch information...
radko93 authored and facebook-github-bot committed Aug 14, 2017
1 parent ef23d2b commit 68bbccbaa25f6364254a19fa6ef88a4b04ac2cbb
Showing with 2 additions and 2 deletions.
  1. +2 −2 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<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);
}

0 comments on commit 68bbccb

Please sign in to comment.