Closed
Description
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
Metadata
Metadata
Assignees
Labels
No labels