Wait for the permission state to change to one of the specified states.
The desired permission state(s).
Optional
task: () => Promise<void>An optional task to execute while waiting for the state change. You can use this to guarantee that certain actions are performed after observation has started.
A promise that resolves when the permission state matches one of the desired states. If the state is already one of the desired states, the promise resolves immediately.
A TypeError if no states are provided.
An observer for permission state changes.