From e66e756953315971eddb266f15b2d0902d00f1ec Mon Sep 17 00:00:00 2001 From: xLuxy <67131061+xLuxy@users.noreply.github.com> Date: Sun, 28 Jan 2024 19:33:54 +0100 Subject: [PATCH] feat(webview): Add getPermissionState typing --- webview/index.d.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/webview/index.d.ts b/webview/index.d.ts index 8b8adf72..4ae3fd5a 100644 --- a/webview/index.d.ts +++ b/webview/index.d.ts @@ -1,3 +1,13 @@ +declare const enum AltPermission { + NONE, + SCREEN_CAPTURE, + WEBRTC, + CLIPBOARD_ACCESS, + EXTENDED_VOICE_API, + All, +} + + interface Alt { /** * Emits specified event across particular client. @@ -46,6 +56,15 @@ interface Alt { getBranch(): string; getLocale(): string; + + /** + * Gets the state of the specified permission. + * + * @param permId Permission id. + * @returns Permission state. + */ + getPermissionState(permId: AltPermission): boolean; + getPermissionState(permId: T): boolean; } interface Window {