44 * This source code is licensed under the MIT license found in the
55 * LICENSE file in the root directory of this source tree.
66 *
7- * @flow
7+ * @flow strict-local
88 * @format
99 */
1010
@@ -28,6 +28,7 @@ type PresentLocalNotificationDetails = {
2828 alertTitle ?: string ,
2929 soundName ?: string ,
3030 category ?: string ,
31+ // $FlowFixMe[unclear-type]
3132 userInfo ?: Object ,
3233 applicationIconBadgeNumber ?: number ,
3334 fireDate ?: number ,
@@ -122,6 +123,7 @@ export interface PushNotification {
122123 /**
123124 * An alias for `getAlert` to get the notification's main message string
124125 */
126+ // $FlowFixMe[unclear-type]
125127 getMessage ( ) : ?string | ?Object ;
126128
127129 /**
@@ -137,6 +139,7 @@ export interface PushNotification {
137139 /**
138140 * Gets the notification's main message from the `aps` object
139141 */
142+ // $FlowFixMe[unclear-type]
140143 getAlert ( ) : ?string | ?Object ;
141144
142145 /**
@@ -152,6 +155,7 @@ export interface PushNotification {
152155 /**
153156 * Gets the data object on the notif
154157 */
158+ // $FlowFixMe[unclear-type]
155159 getData ( ) : ?Object ;
156160
157161 /**
@@ -174,7 +178,9 @@ export interface PushNotification {
174178 * @deprecated Use [@react-native-community/push-notification-ios](https://www.npmjs.com/package/@react-native-community/push-notification-ios) instead
175179 */
176180class PushNotificationIOS {
181+ // $FlowFixMe[unclear-type]
177182 _data : Object ;
183+ // $FlowFixMe[unclear-type]
178184 _alert : string | Object ;
179185 _sound : string ;
180186 _category : string ;
@@ -276,6 +282,7 @@ class PushNotificationIOS {
276282 * See https://reactnative.dev/docs/pushnotificationios#getdeliverednotifications
277283 */
278284 static getDeliveredNotifications (
285+ // $FlowFixMe[unclear-type]
279286 callback : ( notifications : Array < Object > ) => void ,
280287 ) : void {
281288 invariant (
@@ -316,6 +323,7 @@ class PushNotificationIOS {
316323 *
317324 * See https://reactnative.dev/docs/pushnotificationios#getapplicationiconbadgenumber
318325 */
326+ // $FlowFixMe[unclear-type]
319327 static getApplicationIconBadgeNumber ( callback : Function ) : void {
320328 invariant (
321329 NativePushNotificationManagerIOS ,
@@ -330,6 +338,7 @@ class PushNotificationIOS {
330338 *
331339 * See https://reactnative.dev/docs/pushnotificationios#cancellocalnotification
332340 */
341+ // $FlowFixMe[unclear-type]
333342 static cancelLocalNotifications ( userInfo : Object ) : void {
334343 invariant (
335344 NativePushNotificationManagerIOS ,
@@ -343,6 +352,7 @@ class PushNotificationIOS {
343352 *
344353 * See https://reactnative.dev/docs/pushnotificationios#getscheduledlocalnotifications
345354 */
355+ // $FlowFixMe[unclear-type]
346356 static getScheduledLocalNotifications ( callback : Function ) : void {
347357 invariant (
348358 NativePushNotificationManagerIOS ,
@@ -359,6 +369,7 @@ class PushNotificationIOS {
359369 */
360370 static addEventListener (
361371 type : PushNotificationEventName ,
372+ // $FlowFixMe[unclear-type]
362373 handler : Function ,
363374 ) : void {
364375 invariant (
@@ -539,6 +550,7 @@ class PushNotificationIOS {
539550 * `getInitialNotification` is sufficient.
540551 *
541552 */
553+ // $FlowFixMe[unclear-type]
542554 constructor ( nativeNotif : Object ) {
543555 this . _data = { } ;
544556 this . _remoteNotificationCompleteCallbackCalled = false ;
@@ -603,6 +615,7 @@ class PushNotificationIOS {
603615 /**
604616 * An alias for `getAlert` to get the notification's main message string.
605617 */
618+ // $FlowFixMe[unclear-type]
606619 getMessage ( ) : ?string | ?Object {
607620 // alias because "alert" is an ambiguous name
608621 return this . _alert ;
@@ -633,6 +646,7 @@ class PushNotificationIOS {
633646 *
634647 * See https://reactnative.dev/docs/pushnotificationios#getalert
635648 */
649+ // $FlowFixMe[unclear-type]
636650 getAlert ( ) : ?string | ?Object {
637651 return this . _alert ;
638652 }
@@ -660,6 +674,7 @@ class PushNotificationIOS {
660674 *
661675 * See https://reactnative.dev/docs/pushnotificationios#getdata
662676 */
677+ // $FlowFixMe[unclear-type]
663678 getData ( ) : ?Object {
664679 return this . _data ;
665680 }
0 commit comments