UNPKG

@btfuse/core

Version:

A native-first framework for building hybdrid web-native applications

26 lines (25 loc) 941 B
import { FusePermissionGrantResult } from './FusePermissionGrantResult'; /** * An interface to standardize handling permissions * @experimental */ export interface IFusePermissionRequest<TSupportedPermission extends number = number> { /** * A list of symbols that would represent the permission to request on the native side. * * The implementation should define an enum, union type, or something that declares * what permissions it supports requesting. * * An implementation should support requesting a grouped set of permissions, which * Android may combine into one prompt. * * iOS will generally use one permission. */ getPermissionSet(): TSupportedPermission[]; /** * Request the permission set * Will resolve if all permissions in the set is granted. * Rejects otherwise. */ request(): Promise<FusePermissionGrantResult<TSupportedPermission>>; }