PermissionResult
interfaceSource L8Type contract for PermissionResult.
interface PermissionResultMembers
| Name | Type |
|---|---|
state | PermissionStatusValue |
supported | boolean |
error | unknown |
Open-code aq-ui React hook for Use Permission.
pnpm dlx aq-ui@alpha add use-permissionImport the parts you need, then jump to an export for its contract.
"use client"
import { usePermission } from "@/hooks/use-permission"Type contract for PermissionResult.
interface PermissionResult| Name | Type |
|---|---|
state | PermissionStatusValue |
supported | boolean |
error | unknown |
Type contract for PermissionStatusValue.
type PermissionStatusValue = PermissionState | "unsupported" | "unavailable"Open-code aq-ui React hook for Use Permission.
function usePermission(descriptor: PermissionDescriptor): PermissionResultPermissionResult| Name | Type |
|---|---|
descriptor | PermissionDescriptor |