Add missing class annotations xplat/js

Reviewed By: SamChou19815

Differential Revision: D38373443

fbshipit-source-id: 1222c4845ebd6b72bd6f54af1a27cf8542dd883a
This commit is contained in:
Pieter Vanderwerff authored and Facebook GitHub Bot committed 2022-08-03 12:43:58 -07:00
1 parent 2fa04be062
commit ee3d3c248d
66 files changed
+378 -294

No files matched your search

@@ -118,7 +118,7 @@ class PushNotificationIOS {
*
* See https://reactnative.dev/docs/pushnotificationios#presentlocalnotification
*/
static presentLocalNotification(details: Object) {
static presentLocalNotification(details: Object): void {
invariant(
NativePushNotificationManagerIOS,
'PushNotificationManager is not available.',
@@ -131,7 +131,7 @@ class PushNotificationIOS {
*
* See https://reactnative.dev/docs/pushnotificationios#schedulelocalnotification
*/
static scheduleLocalNotification(details: Object) {
static scheduleLocalNotification(details: Object): void {
invariant(
NativePushNotificationManagerIOS,
'PushNotificationManager is not available.',
@@ -144,7 +144,7 @@ class PushNotificationIOS {
*
* See https://reactnative.dev/docs/pushnotificationios#cancelalllocalnotifications
*/
static cancelAllLocalNotifications() {
static cancelAllLocalNotifications(): void {
invariant(
NativePushNotificationManagerIOS,
'PushNotificationManager is not available.',
@@ -198,7 +198,7 @@ class PushNotificationIOS {
*
* See https://reactnative.dev/docs/pushnotificationios#setapplicationiconbadgenumber
*/
static setApplicationIconBadgeNumber(number: number) {
static setApplicationIconBadgeNumber(number: number): void {
invariant(
NativePushNotificationManagerIOS,
'PushNotificationManager is not available.',
@@ -211,7 +211,7 @@ class PushNotificationIOS {
*
* See https://reactnative.dev/docs/pushnotificationios#getapplicationiconbadgenumber
*/
static getApplicationIconBadgeNumber(callback: Function) {
static getApplicationIconBadgeNumber(callback: Function): void {
invariant(
NativePushNotificationManagerIOS,
'PushNotificationManager is not available.',
@@ -224,7 +224,7 @@ class PushNotificationIOS {
*
* See https://reactnative.dev/docs/pushnotificationios#cancellocalnotification
*/
static cancelLocalNotifications(userInfo: Object) {
static cancelLocalNotifications(userInfo: Object): void {
invariant(
NativePushNotificationManagerIOS,
'PushNotificationManager is not available.',
@@ -237,7 +237,7 @@ class PushNotificationIOS {
*
* See https://reactnative.dev/docs/pushnotificationios#getscheduledlocalnotifications
*/
static getScheduledLocalNotifications(callback: Function) {
static getScheduledLocalNotifications(callback: Function): void {
invariant(
NativePushNotificationManagerIOS,
'PushNotificationManager is not available.',
@@ -251,7 +251,10 @@ class PushNotificationIOS {
*
* See https://reactnative.dev/docs/pushnotificationios#addeventlistener
*/
static addEventListener(type: PushNotificationEventName, handler: Function) {
static addEventListener(
type: PushNotificationEventName,
handler: Function,
): void {
invariant(
type === 'notification' ||
type === 'register' ||
@@ -301,7 +304,7 @@ class PushNotificationIOS {
static removeEventListener(
type: PushNotificationEventName,
handler: Function,
) {
): void {
invariant(
type === 'notification' ||
type === 'register' ||
@@ -362,7 +365,7 @@ class PushNotificationIOS {
*
* See https://reactnative.dev/docs/pushnotificationios#abandonpermissions
*/
static abandonPermissions() {
static abandonPermissions(): void {
invariant(
NativePushNotificationManagerIOS,
'PushNotificationManager is not available.',
@@ -376,7 +379,7 @@ class PushNotificationIOS {
*
* See https://reactnative.dev/docs/pushnotificationios#checkpermissions
*/
static checkPermissions(callback: Function) {
static checkPermissions(callback: Function): void {
invariant(typeof callback === 'function', 'Must provide a valid callback');
invariant(
NativePushNotificationManagerIOS,
@@ -463,7 +466,7 @@ class PushNotificationIOS {
*
* See https://reactnative.dev/docs/pushnotificationios#finish
*/
finish(fetchResult: string) {
finish(fetchResult: string): void {
if (
!this._isRemote ||
!this._notificationId ||