β¬ οΈ Back to Table of Contents
π usePermission¶
π Analysis Summary¶
| Metric | Count |
|---|---|
| π§ Functions | 2 |
| π¦ Imports | 9 |
| π Interfaces | 2 |
| π Type Aliases | 3 |
π Table of Contents¶
π οΈ File Location:¶
π packages/core/usePermission/index.ts
π¦ Imports¶
| Name | Source |
|---|---|
ShallowRef |
vue |
ConfigurableNavigator |
../_configurable |
Supportable |
../types |
createSingletonPromise |
@vueuse/shared |
shallowRef |
vue |
toRaw |
vue |
defaultNavigator |
../_configurable |
useEventListener |
../useEventListener |
useSupported |
../useSupported |
Functions¶
usePermission(permissionDesc: GeneralPermissionDescriptor | GeneralPeβ¦, options: UsePermissionOptions<false>): UsePermissionReturn¶
Reactive Permissions API.
See: https://vueuse.org/usePermission
Tags: @__NO_SIDE_EFFECTS__
Raw JSDoc
Code
Internal helpers¶
Declared inside another function in this file.
update(): void¶
Returns: void
Interfaces¶
UsePermissionOptions<Controls extends boolean>¶
Interface Code
Properties¶
| Name | Type | Optional | Description |
|---|---|---|---|
controls |
Controls |
β | not shown |
UsePermissionReturnWithControls¶
Interface Code
Properties¶
| Name | Type | Optional | Description |
|---|---|---|---|
state |
UsePermissionReturn |
β | not shown |
query |
() => Promise<PermissionStatus \| undefined> |
β | not shown |
Type Aliases¶
DescriptorNamePolyfill¶
type DescriptorNamePolyfill = 'accelerometer'
| 'accessibility-events'
| 'ambient-light-sensor'
| 'background-sync'
| 'camera'
| 'clipboard-read'
| 'clipboard-write'
| 'gyroscope'
| 'magnetometer'
| 'microphone'
| 'notifications'
| 'payment-handler'
| 'persistent-storage'
| 'push'
| 'speaker'
| 'local-fonts';
GeneralPermissionDescriptor¶
UsePermissionReturn¶
Generated by Syntax Scribe