diff options
Diffstat (limited to 'cli/js/lib.deno.shared_globals.d.ts')
-rw-r--r-- | cli/js/lib.deno.shared_globals.d.ts | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/cli/js/lib.deno.shared_globals.d.ts b/cli/js/lib.deno.shared_globals.d.ts index 893af8bbe..f37dfa366 100644 --- a/cli/js/lib.deno.shared_globals.d.ts +++ b/cli/js/lib.deno.shared_globals.d.ts @@ -1646,60 +1646,6 @@ declare const AbortSignal: { new (): AbortSignal; }; -type PermissionState = "denied" | "granted" | "prompt"; - -interface PermissionStatusEventMap { - change: Event; -} - -interface PermissionStatus extends EventTarget { - onchange: ((this: PermissionStatus, ev: Event) => any) | null; - readonly state: PermissionState; - addEventListener<K extends keyof PermissionStatusEventMap>( - type: K, - listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, - options?: boolean | AddEventListenerOptions - ): void; - addEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions - ): void; - removeEventListener<K extends keyof PermissionStatusEventMap>( - type: K, - listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, - options?: boolean | EventListenerOptions - ): void; - removeEventListener( - type: string, - listener: EventListenerOrEventListenerObject, - options?: boolean | EventListenerOptions - ): void; -} - -/** Deno does not currently support any of the browser permissions, and so the - * `name` property of the global types is `undefined`. The Deno permissions - * that are supported are defined in the `lib.deno.ns.d.ts` and pull from the - * `Deno` namespace. */ -declare interface PermissionDescriptor { - name: undefined; -} - -declare interface Permissions { - query(permissionDesc: PermissionDescriptor): Promise<PermissionStatus>; -} - -declare const Permissions: { - prototype: Permissions; - new (): Permissions; -}; - -declare class Navigator { - readonly permissions: Permissions; -} - -declare const navigator: Navigator; - interface ErrorConstructor { /** See https://v8.dev/docs/stack-trace-api#stack-trace-collection-for-custom-exceptions. */ // eslint-disable-next-line @typescript-eslint/ban-types |