Skip to content

Commit

Permalink
feat(webview): Add getPermissionState typing
Browse files Browse the repository at this point in the history
  • Loading branch information
xLuxy committed Jan 28, 2024
1 parent 3252a66 commit e66e756
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions webview/index.d.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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<T extends number>(permId: T): boolean;
}

interface Window {
Expand Down

0 comments on commit e66e756

Please sign in to comment.