Types
Global
This package uses interface declarations that you can override to ensure proper typing. For example:
index.d.ts
import { PermissionStatus as RNPermissionStatus } from 'react-native-permissions'
type PermissionStatus = Record<RNPermissionStatus, boolean>
declare module '@codeleap/permissions' {
export interface Status extends PermissionStatus {}
export interface PermissionConfig {
title?: string
description?: string
}
}
-
Status
: Type used forPermissionStatus
. -
PermissionsConfig
: Configuration type for each permission.