type permissionDescriptor = {mutable name: permissionName}
type permissionName = | @as("geolocation") Geolocation | @as("midi") Midi | @as("notifications") Notifications | @as("persistent-storage") PersistentStorage | @as("push") Push | @as("screen-wake-lock") ScreenWakeLock | @as("storage-access") StorageAccess
See Permissions on MDN
type permissions = {}
There are methods and helpers defined in Permissions .
type permissionState = | @as("denied") Denied | @as("granted") Granted | @as("prompt") Prompt
See PermissionStatus on MDN
type permissionStatus = { state: permissionState, name: string,}
Read more on MDN