From f419d221c12228fa4490c9c20f1a4b63d51f8ebd Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 25 Apr 2022 09:46:30 +0200 Subject: [PATCH] chore(types): update ts defs --- index.d.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/index.d.ts b/index.d.ts index 5982ef9..97cf1eb 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,20 +1,21 @@ // Type definitions for node-mac-permissions // Project: node-mac-permissions -export function askForCalendarAccess(): Promise<'authorized' | 'denied'> -export function askForContactsAccess(): Promise<'authorized' | 'denied'> -export function askForFoldersAccess(): Promise<'authorized' | 'denied'> +export function askForCalendarAccess(): Promise> +export function askForContactsAccess(): Promise> +export function askForFoldersAccess(): Promise> export function askForFullDiskAccess(): undefined -export function askForRemindersAccess(): Promise<'authorized' | 'denied'> -export function askForCameraAccess(): Promise<'authorized' | 'denied' | 'restricted'> -export function askForMicrophoneAccess(): Promise<'authorized' | 'denied' | 'restricted'> -export function askForPhotosAccess(): Promise<'authorized' | 'denied' | 'restricted'> -export function askForSpeechRecognitionAccess(): Promise<'authorized' | 'denied'> +export function askForRemindersAccess(): Promise> +export function askForCameraAccess(): Promise +export function askForMicrophoneAccess(): Promise +export function askForPhotosAccess(): Promise +export function askForSpeechRecognitionAccess(): Promise> export function askForScreenCaptureAccess(): undefined export function askForAccessibilityAccess(): undefined -export function getAuthStatus(authType: AuthType): PermissionType +export function getAuthStatus(authType: AuthType): PermissionType | 'not determined' export type AuthType = + | 'bluetooth' | 'contacts' | 'calendar' | 'reminders' @@ -23,8 +24,9 @@ export type AuthType = | 'photos' | 'speech-recognition' | 'microphone' + | 'music-library' | 'accessibility' | 'location' | 'screen' -export type PermissionType = 'not determined' | 'denied' | 'authorized' | 'restricted' +export type PermissionType = 'authorized' | 'denied' | 'restricted'