You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The type returned by PushNotificationIOS.requestPermissions(...) is PushNotificationPermissions which has a property authorizationStatus. The real type of the authorizationStatus property is a number but the TS type has it as an interface.
Currently, I have to do this to bypass the TypeScript error:
const permission = await PushNotificationIOS.requestPermissions(...)
const authorized = ((permission.authorizationStatus as any) as number) === PushNotificationIOS.AuthorizationStatus.UNAuthorizationStatusAuthorized
The text was updated successfully, but these errors were encountered:
Mighty683
pushed a commit
to Mighty683/push-notification-ios
that referenced
this issue
Oct 19, 2020
The type returned by
PushNotificationIOS.requestPermissions(...)
isPushNotificationPermissions
which has a propertyauthorizationStatus
. The real type of theauthorizationStatus
property is a number but the TS type has it as an interface.Currently, I have to do this to bypass the TypeScript error:
The text was updated successfully, but these errors were encountered: