From 151b807fee7a436b6846157175d6648fe8a35656 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 28 Aug 2020 09:07:27 +0200 Subject: [PATCH] run import, minor edits --- scripts/importTypescript.js | 10 +- src/languageFeatures.ts | 5 +- src/lib/lib.ts | 183 ++++++++++++++++++++++++++++-------- src/tsWorker.ts | 4 +- src/workerManager.ts | 5 +- 5 files changed, 155 insertions(+), 52 deletions(-) diff --git a/scripts/importTypescript.js b/scripts/importTypescript.js index 12fd6449..bc181e25 100644 --- a/scripts/importTypescript.js +++ b/scripts/importTypescript.js @@ -101,25 +101,19 @@ export = ts; })(); function importLibs() { - function getFileName(name) { - return name - } - function getVariableName(name) { - return name.replace(/\./g, '_') + "_dts" - } function readLibFile(name) { var srcPath = path.join(TYPESCRIPT_LIB_SOURCE, name); return fs.readFileSync(srcPath).toString(); } - var dtsFiles = fs.readdirSync(TYPESCRIPT_LIB_SOURCE).filter(f => f.includes("lib.")) + var dtsFiles = fs.readdirSync(TYPESCRIPT_LIB_SOURCE).filter(f => f.includes("lib.")); var result = []; while (dtsFiles.length > 0) { var name = dtsFiles.shift(); var output = readLibFile(name); result.push({ - name: getVariableName(name), + name: name.replace(/\./g, '_') + "_dts", filepath: name, deps: [], output: '"' + escapeText(output) + '"' diff --git a/src/languageFeatures.ts b/src/languageFeatures.ts index 28d85d08..342a0329 100644 --- a/src/languageFeatures.ts +++ b/src/languageFeatures.ts @@ -7,7 +7,7 @@ import { LanguageServiceDefaultsImpl } from './monaco.contribution'; import * as ts from './lib/typescriptServices'; import { TypeScriptWorker } from './tsWorker'; -import {libFileMap} from "./lib/lib" +import { libFileMap } from "./lib/lib" import Uri = monaco.Uri; import Position = monaco.Position; @@ -23,7 +23,7 @@ enum IndentStyle { Smart = 2 } -function getOrCreateLibFile(uri: Uri) { +function getOrCreateLibFile(uri: Uri): monaco.editor.ITextModel | null { let model = monaco.editor.getModel(uri) if (!model) { if (uri.path.indexOf("/lib.") === 0) { @@ -33,7 +33,6 @@ function getOrCreateLibFile(uri: Uri) { return model } - export function flattenDiagnosticMessageText(diag: string | ts.DiagnosticMessageChain | undefined, newLine: string, indent = 0): string { if (typeof diag === "string") { return diag; diff --git a/src/lib/lib.ts b/src/lib/lib.ts index a3fb01fa..ec72335c 100644 --- a/src/lib/lib.ts +++ b/src/lib/lib.ts @@ -6,61 +6,168 @@ // **NOTE**: Do not edit directly! This file is generated using `npm run import-typescript` // + +/** Contains all the lib files */ export const libFileMap: Record = {} -export const lib_es2015_symbol_dts: string = "/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */\n\n\n\n/// \n\n\ninterface SymbolConstructor {\n /**\n * A reference to the prototype.\n */\n readonly prototype: Symbol;\n\n /**\n * Returns a new unique Symbol value.\n * @param description Description of the new Symbol object.\n */\n (description?: string | number): symbol;\n\n /**\n * Returns a Symbol object from the global symbol registry matching the given key if found.\n * Otherwise, returns a new symbol with this key.\n * @param key key to search for.\n */\n for(key: string): symbol;\n\n /**\n * Returns a key from the global symbol registry matching the given Symbol if found.\n * Otherwise, returns a undefined.\n * @param sym Symbol to find the key for.\n */\n keyFor(sym: symbol): string | undefined;\n}\n\ndeclare var Symbol: SymbolConstructor;"; -libFileMap['lib.es2015.symbol.d.ts'] = lib_es2015_symbol_dts; +export const lib_webworker_importscripts_d_ts_dts: string = "/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved. \nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0 \n \nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, \nMERCHANTABLITY OR NON-INFRINGEMENT. \n \nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */\n\n\n\n/// \r\n\n\n\r\n/////////////////////////////\r\n/// WorkerGlobalScope APIs\r\n/////////////////////////////\r\n// These are only available in a Web Worker\r\ndeclare function importScripts(...urls: string[]): void;\r\n"; +libFileMap['lib.webworker.importscripts.d.ts'] = lib_webworker_importscripts_d_ts_dts; + +export const lib_webworker_d_ts_dts: string = "/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved. \nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0 \n \nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, \nMERCHANTABLITY OR NON-INFRINGEMENT. \n \nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */\n\n\n\n/// \r\n\n\n/////////////////////////////\n/// Worker APIs\n/////////////////////////////\n\ninterface AddEventListenerOptions extends EventListenerOptions {\n once?: boolean;\n passive?: boolean;\n}\n\ninterface AesCbcParams extends Algorithm {\n iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;\n}\n\ninterface AesCtrParams extends Algorithm {\n counter: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;\n length: number;\n}\n\ninterface AesDerivedKeyParams extends Algorithm {\n length: number;\n}\n\ninterface AesGcmParams extends Algorithm {\n additionalData?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;\n iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;\n tagLength?: number;\n}\n\ninterface AesKeyAlgorithm extends KeyAlgorithm {\n length: number;\n}\n\ninterface AesKeyGenParams extends Algorithm {\n length: number;\n}\n\ninterface Algorithm {\n name: string;\n}\n\ninterface BlobPropertyBag {\n endings?: EndingType;\n type?: string;\n}\n\ninterface CacheQueryOptions {\n ignoreMethod?: boolean;\n ignoreSearch?: boolean;\n ignoreVary?: boolean;\n}\n\ninterface CanvasRenderingContext2DSettings {\n alpha?: boolean;\n desynchronized?: boolean;\n}\n\ninterface ClientQueryOptions {\n includeUncontrolled?: boolean;\n type?: ClientTypes;\n}\n\ninterface CloseEventInit extends EventInit {\n code?: number;\n reason?: string;\n wasClean?: boolean;\n}\n\ninterface CryptoKeyPair {\n privateKey?: CryptoKey;\n publicKey?: CryptoKey;\n}\n\ninterface CustomEventInit extends EventInit {\n detail?: T;\n}\n\ninterface DOMMatrix2DInit {\n a?: number;\n b?: number;\n c?: number;\n d?: number;\n e?: number;\n f?: number;\n m11?: number;\n m12?: number;\n m21?: number;\n m22?: number;\n m41?: number;\n m42?: number;\n}\n\ninterface DOMMatrixInit extends DOMMatrix2DInit {\n is2D?: boolean;\n m13?: number;\n m14?: number;\n m23?: number;\n m24?: number;\n m31?: number;\n m32?: number;\n m33?: number;\n m34?: number;\n m43?: number;\n m44?: number;\n}\n\ninterface DOMPointInit {\n w?: number;\n x?: number;\n y?: number;\n z?: number;\n}\n\ninterface DOMQuadInit {\n p1?: DOMPointInit;\n p2?: DOMPointInit;\n p3?: DOMPointInit;\n p4?: DOMPointInit;\n}\n\ninterface DOMRectInit {\n height?: number;\n width?: number;\n x?: number;\n y?: number;\n}\n\ninterface DevicePermissionDescriptor extends PermissionDescriptor {\n deviceId?: string;\n name: \"camera\" | \"microphone\" | \"speaker\";\n}\n\ninterface EcKeyGenParams extends Algorithm {\n namedCurve: NamedCurve;\n}\n\ninterface EcKeyImportParams extends Algorithm {\n namedCurve: NamedCurve;\n}\n\ninterface EcdhKeyDeriveParams extends Algorithm {\n public: CryptoKey;\n}\n\ninterface EcdsaParams extends Algorithm {\n hash: HashAlgorithmIdentifier;\n}\n\ninterface ErrorEventInit extends EventInit {\n colno?: number;\n error?: any;\n filename?: string;\n lineno?: number;\n message?: string;\n}\n\ninterface EventInit {\n bubbles?: boolean;\n cancelable?: boolean;\n composed?: boolean;\n}\n\ninterface EventListenerOptions {\n capture?: boolean;\n}\n\ninterface EventSourceInit {\n withCredentials?: boolean;\n}\n\ninterface ExtendableEventInit extends EventInit {\n}\n\ninterface ExtendableMessageEventInit extends ExtendableEventInit {\n data?: any;\n lastEventId?: string;\n origin?: string;\n ports?: MessagePort[];\n source?: Client | ServiceWorker | MessagePort | null;\n}\n\ninterface FetchEventInit extends ExtendableEventInit {\n clientId?: string;\n preloadResponse?: Promise;\n replacesClientId?: string;\n request: Request;\n resultingClientId?: string;\n}\n\ninterface FilePropertyBag extends BlobPropertyBag {\n lastModified?: number;\n}\n\ninterface GetNotificationOptions {\n tag?: string;\n}\n\ninterface HmacImportParams extends Algorithm {\n hash: HashAlgorithmIdentifier;\n length?: number;\n}\n\ninterface HmacKeyGenParams extends Algorithm {\n hash: HashAlgorithmIdentifier;\n length?: number;\n}\n\ninterface IDBIndexParameters {\n multiEntry?: boolean;\n unique?: boolean;\n}\n\ninterface IDBObjectStoreParameters {\n autoIncrement?: boolean;\n keyPath?: string | string[] | null;\n}\n\ninterface IDBVersionChangeEventInit extends EventInit {\n newVersion?: number | null;\n oldVersion?: number;\n}\n\ninterface ImageBitmapRenderingContextSettings {\n alpha?: boolean;\n}\n\ninterface ImageEncodeOptions {\n quality?: number;\n type?: string;\n}\n\ninterface JsonWebKey {\n alg?: string;\n crv?: string;\n d?: string;\n dp?: string;\n dq?: string;\n e?: string;\n ext?: boolean;\n k?: string;\n key_ops?: string[];\n kty?: string;\n n?: string;\n oth?: RsaOtherPrimesInfo[];\n p?: string;\n q?: string;\n qi?: string;\n use?: string;\n x?: string;\n y?: string;\n}\n\ninterface KeyAlgorithm {\n name: string;\n}\n\ninterface MessageEventInit extends EventInit {\n data?: any;\n lastEventId?: string;\n origin?: string;\n ports?: MessagePort[];\n source?: MessageEventSource | null;\n}\n\ninterface MidiPermissionDescriptor extends PermissionDescriptor {\n name: \"midi\";\n sysex?: boolean;\n}\n\ninterface MultiCacheQueryOptions extends CacheQueryOptions {\n cacheName?: string;\n}\n\ninterface NavigationPreloadState {\n enabled?: boolean;\n headerValue?: string;\n}\n\ninterface NotificationAction {\n action: string;\n icon?: string;\n title: string;\n}\n\ninterface NotificationEventInit extends ExtendableEventInit {\n action?: string;\n notification: Notification;\n}\n\ninterface NotificationOptions {\n actions?: NotificationAction[];\n badge?: string;\n body?: string;\n data?: any;\n dir?: NotificationDirection;\n icon?: string;\n image?: string;\n lang?: string;\n renotify?: boolean;\n requireInteraction?: boolean;\n silent?: boolean;\n tag?: string;\n timestamp?: number;\n vibrate?: VibratePattern;\n}\n\ninterface Pbkdf2Params extends Algorithm {\n hash: HashAlgorithmIdentifier;\n iterations: number;\n salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;\n}\n\ninterface PerformanceObserverInit {\n buffered?: boolean;\n entryTypes?: string[];\n type?: string;\n}\n\ninterface PermissionDescriptor {\n name: PermissionName;\n}\n\ninterface PipeOptions {\n preventAbort?: boolean;\n preventCancel?: boolean;\n preventClose?: boolean;\n signal?: AbortSignal;\n}\n\ninterface PostMessageOptions {\n transfer?: any[];\n}\n\ninterface ProgressEventInit extends EventInit {\n lengthComputable?: boolean;\n loaded?: number;\n total?: number;\n}\n\ninterface PromiseRejectionEventInit extends EventInit {\n promise: Promise;\n reason?: any;\n}\n\ninterface PushEventInit extends ExtendableEventInit {\n data?: PushMessageDataInit;\n}\n\ninterface PushPermissionDescriptor extends PermissionDescriptor {\n name: \"push\";\n userVisibleOnly?: boolean;\n}\n\ninterface PushSubscriptionChangeEventInit extends ExtendableEventInit {\n newSubscription?: PushSubscription;\n oldSubscription?: PushSubscription;\n}\n\ninterface PushSubscriptionJSON {\n endpoint?: string;\n expirationTime?: number | null;\n keys?: Record;\n}\n\ninterface PushSubscriptionOptionsInit {\n applicationServerKey?: BufferSource | string | null;\n userVisibleOnly?: boolean;\n}\n\ninterface QueuingStrategy {\n highWaterMark?: number;\n size?: QueuingStrategySizeCallback;\n}\n\ninterface ReadableStreamReadDoneResult {\n done: true;\n value?: T;\n}\n\ninterface ReadableStreamReadValueResult {\n done: false;\n value: T;\n}\n\ninterface RegistrationOptions {\n scope?: string;\n type?: WorkerType;\n updateViaCache?: ServiceWorkerUpdateViaCache;\n}\n\ninterface RequestInit {\n /**\n * A BodyInit object or null to set request's body.\n */\n body?: BodyInit | null;\n /**\n * A string indicating how the request will interact with the browser's cache to set request's cache.\n */\n cache?: RequestCache;\n /**\n * A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.\n */\n credentials?: RequestCredentials;\n /**\n * A Headers object, an object literal, or an array of two-item arrays to set request's headers.\n */\n headers?: HeadersInit;\n /**\n * A cryptographic hash of the resource to be fetched by request. Sets request's integrity.\n */\n integrity?: string;\n /**\n * A boolean to set request's keepalive.\n */\n keepalive?: boolean;\n /**\n * A string to set request's method.\n */\n method?: string;\n /**\n * A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.\n */\n mode?: RequestMode;\n /**\n * A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.\n */\n redirect?: RequestRedirect;\n /**\n * A string whose value is a same-origin URL, \"about:client\", or the empty string, to set request's referrer.\n */\n referrer?: string;\n /**\n * A referrer policy to set request's referrerPolicy.\n */\n referrerPolicy?: ReferrerPolicy;\n /**\n * An AbortSignal to set request's signal.\n */\n signal?: AbortSignal | null;\n /**\n * Can only be null. Used to disassociate request from any Window.\n */\n window?: any;\n}\n\ninterface ResponseInit {\n headers?: HeadersInit;\n status?: number;\n statusText?: string;\n}\n\ninterface RsaHashedImportParams extends Algorithm {\n hash: HashAlgorithmIdentifier;\n}\n\ninterface RsaHashedKeyGenParams extends RsaKeyGenParams {\n hash: HashAlgorithmIdentifier;\n}\n\ninterface RsaKeyGenParams extends Algorithm {\n modulusLength: number;\n publicExponent: BigInteger;\n}\n\ninterface RsaOaepParams extends Algorithm {\n label?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;\n}\n\ninterface RsaOtherPrimesInfo {\n d?: string;\n r?: string;\n t?: string;\n}\n\ninterface RsaPssParams extends Algorithm {\n saltLength: number;\n}\n\ninterface StorageEstimate {\n quota?: number;\n usage?: number;\n}\n\ninterface SyncEventInit extends ExtendableEventInit {\n lastChance?: boolean;\n tag: string;\n}\n\ninterface TextDecodeOptions {\n stream?: boolean;\n}\n\ninterface TextDecoderOptions {\n fatal?: boolean;\n ignoreBOM?: boolean;\n}\n\ninterface TextEncoderEncodeIntoResult {\n read?: number;\n written?: number;\n}\n\ninterface Transformer {\n flush?: TransformStreamDefaultControllerCallback;\n readableType?: undefined;\n start?: TransformStreamDefaultControllerCallback;\n transform?: TransformStreamDefaultControllerTransformCallback;\n writableType?: undefined;\n}\n\ninterface UnderlyingByteSource {\n autoAllocateChunkSize?: number;\n cancel?: ReadableStreamErrorCallback;\n pull?: ReadableByteStreamControllerCallback;\n start?: ReadableByteStreamControllerCallback;\n type: \"bytes\";\n}\n\ninterface UnderlyingSink {\n abort?: WritableStreamErrorCallback;\n close?: WritableStreamDefaultControllerCloseCallback;\n start?: WritableStreamDefaultControllerStartCallback;\n type?: undefined;\n write?: WritableStreamDefaultControllerWriteCallback;\n}\n\ninterface UnderlyingSource {\n cancel?: ReadableStreamErrorCallback;\n pull?: ReadableStreamDefaultControllerCallback;\n start?: ReadableStreamDefaultControllerCallback;\n type?: undefined;\n}\n\ninterface WebGLContextAttributes {\n alpha?: boolean;\n antialias?: boolean;\n depth?: boolean;\n desynchronized?: boolean;\n failIfMajorPerformanceCaveat?: boolean;\n powerPreference?: WebGLPowerPreference;\n premultipliedAlpha?: boolean;\n preserveDrawingBuffer?: boolean;\n stencil?: boolean;\n}\n\ninterface WebGLContextEventInit extends EventInit {\n statusMessage?: string;\n}\n\ninterface WorkerOptions {\n credentials?: RequestCredentials;\n name?: string;\n type?: WorkerType;\n}\n\ninterface EventListener {\n (evt: Event): void;\n}\n\n/** The ANGLE_instanced_arrays extension is part of the WebGL API and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type. */\ninterface ANGLE_instanced_arrays {\n drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void;\n drawElementsInstancedANGLE(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, primcount: GLsizei): void;\n vertexAttribDivisorANGLE(index: GLuint, divisor: GLuint): void;\n readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum;\n}\n\n/** A controller object that allows you to abort one or more DOM requests as and when desired. */\ninterface AbortController {\n /**\n * Returns the AbortSignal object associated with this object.\n */\n readonly signal: AbortSignal;\n /**\n * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.\n */\n abort(): void;\n}\n\ndeclare var AbortController: {\n prototype: AbortController;\n new(): AbortController;\n};\n\ninterface AbortSignalEventMap {\n \"abort\": Event;\n}\n\n/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */\ninterface AbortSignal extends EventTarget {\n /**\n * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.\n */\n readonly aborted: boolean;\n onabort: ((this: AbortSignal, ev: Event) => any) | null;\n addEventListener(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var AbortSignal: {\n prototype: AbortSignal;\n new(): AbortSignal;\n};\n\ninterface AbstractWorkerEventMap {\n \"error\": ErrorEvent;\n}\n\ninterface AbstractWorker {\n onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null;\n addEventListener(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ninterface AesCfbParams extends Algorithm {\n iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;\n}\n\ninterface AesCmacParams extends Algorithm {\n length: number;\n}\n\ninterface AnimationFrameProvider {\n cancelAnimationFrame(handle: number): void;\n requestAnimationFrame(callback: FrameRequestCallback): number;\n}\n\n/** A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. */\ninterface Blob {\n readonly size: number;\n readonly type: string;\n arrayBuffer(): Promise;\n slice(start?: number, end?: number, contentType?: string): Blob;\n stream(): ReadableStream;\n text(): Promise;\n}\n\ndeclare var Blob: {\n prototype: Blob;\n new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;\n};\n\ninterface Body {\n readonly body: ReadableStream | null;\n readonly bodyUsed: boolean;\n arrayBuffer(): Promise;\n blob(): Promise;\n formData(): Promise;\n json(): Promise;\n text(): Promise;\n}\n\ninterface BroadcastChannelEventMap {\n \"message\": MessageEvent;\n \"messageerror\": MessageEvent;\n}\n\ninterface BroadcastChannel extends EventTarget {\n /**\n * Returns the channel name (as passed to the constructor).\n */\n readonly name: string;\n onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;\n onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;\n /**\n * Closes the BroadcastChannel object, opening it up to garbage collection.\n */\n close(): void;\n /**\n * Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays.\n */\n postMessage(message: any): void;\n addEventListener(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var BroadcastChannel: {\n prototype: BroadcastChannel;\n new(name: string): BroadcastChannel;\n};\n\n/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */\ninterface ByteLengthQueuingStrategy extends QueuingStrategy {\n highWaterMark: number;\n size(chunk: ArrayBufferView): number;\n}\n\ndeclare var ByteLengthQueuingStrategy: {\n prototype: ByteLengthQueuingStrategy;\n new(options: { highWaterMark: number }): ByteLengthQueuingStrategy;\n};\n\n/** Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. */\ninterface Cache {\n add(request: RequestInfo): Promise;\n addAll(requests: RequestInfo[]): Promise;\n delete(request: RequestInfo, options?: CacheQueryOptions): Promise;\n keys(request?: RequestInfo, options?: CacheQueryOptions): Promise>;\n match(request: RequestInfo, options?: CacheQueryOptions): Promise;\n matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise>;\n put(request: RequestInfo, response: Response): Promise;\n}\n\ndeclare var Cache: {\n prototype: Cache;\n new(): Cache;\n};\n\n/** The storage for Cache objects. */\ninterface CacheStorage {\n delete(cacheName: string): Promise;\n has(cacheName: string): Promise;\n keys(): Promise;\n match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise;\n open(cacheName: string): Promise;\n}\n\ndeclare var CacheStorage: {\n prototype: CacheStorage;\n new(): CacheStorage;\n};\n\ninterface CanvasCompositing {\n globalAlpha: number;\n globalCompositeOperation: string;\n}\n\ninterface CanvasDrawImage {\n drawImage(image: CanvasImageSource, dx: number, dy: number): void;\n drawImage(image: CanvasImageSource, dx: number, dy: number, dw: number, dh: number): void;\n drawImage(image: CanvasImageSource, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void;\n}\n\ninterface CanvasDrawPath {\n beginPath(): void;\n clip(fillRule?: CanvasFillRule): void;\n clip(path: Path2D, fillRule?: CanvasFillRule): void;\n fill(fillRule?: CanvasFillRule): void;\n fill(path: Path2D, fillRule?: CanvasFillRule): void;\n isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean;\n isPointInPath(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean;\n isPointInStroke(x: number, y: number): boolean;\n isPointInStroke(path: Path2D, x: number, y: number): boolean;\n stroke(): void;\n stroke(path: Path2D): void;\n}\n\ninterface CanvasFillStrokeStyles {\n fillStyle: string | CanvasGradient | CanvasPattern;\n strokeStyle: string | CanvasGradient | CanvasPattern;\n createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;\n createPattern(image: CanvasImageSource, repetition: string): CanvasPattern | null;\n createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;\n}\n\ninterface CanvasFilters {\n filter: string;\n}\n\n/** An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). */\ninterface CanvasGradient {\n /**\n * Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.\n * \n * Throws an \"IndexSizeError\" DOMException if the offset is out of range. Throws a \"SyntaxError\" DOMException if the color cannot be parsed.\n */\n addColorStop(offset: number, color: string): void;\n}\n\ndeclare var CanvasGradient: {\n prototype: CanvasGradient;\n new(): CanvasGradient;\n};\n\ninterface CanvasImageData {\n createImageData(sw: number, sh: number): ImageData;\n createImageData(imagedata: ImageData): ImageData;\n getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;\n putImageData(imagedata: ImageData, dx: number, dy: number): void;\n putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void;\n}\n\ninterface CanvasImageSmoothing {\n imageSmoothingEnabled: boolean;\n imageSmoothingQuality: ImageSmoothingQuality;\n}\n\ninterface CanvasPath {\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\n arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;\n bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;\n closePath(): void;\n ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\n lineTo(x: number, y: number): void;\n moveTo(x: number, y: number): void;\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\n rect(x: number, y: number, w: number, h: number): void;\n}\n\ninterface CanvasPathDrawingStyles {\n lineCap: CanvasLineCap;\n lineDashOffset: number;\n lineJoin: CanvasLineJoin;\n lineWidth: number;\n miterLimit: number;\n getLineDash(): number[];\n setLineDash(segments: number[]): void;\n}\n\n/** An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. */\ninterface CanvasPattern {\n /**\n * Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation.\n */\n setTransform(transform?: DOMMatrix2DInit): void;\n}\n\ndeclare var CanvasPattern: {\n prototype: CanvasPattern;\n new(): CanvasPattern;\n};\n\ninterface CanvasRect {\n clearRect(x: number, y: number, w: number, h: number): void;\n fillRect(x: number, y: number, w: number, h: number): void;\n strokeRect(x: number, y: number, w: number, h: number): void;\n}\n\ninterface CanvasShadowStyles {\n shadowBlur: number;\n shadowColor: string;\n shadowOffsetX: number;\n shadowOffsetY: number;\n}\n\ninterface CanvasState {\n restore(): void;\n save(): void;\n}\n\ninterface CanvasText {\n fillText(text: string, x: number, y: number, maxWidth?: number): void;\n measureText(text: string): TextMetrics;\n strokeText(text: string, x: number, y: number, maxWidth?: number): void;\n}\n\ninterface CanvasTextDrawingStyles {\n direction: CanvasDirection;\n font: string;\n textAlign: CanvasTextAlign;\n textBaseline: CanvasTextBaseline;\n}\n\ninterface CanvasTransform {\n getTransform(): DOMMatrix;\n resetTransform(): void;\n rotate(angle: number): void;\n scale(x: number, y: number): void;\n setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;\n setTransform(transform?: DOMMatrix2DInit): void;\n transform(a: number, b: number, c: number, d: number, e: number, f: number): void;\n translate(x: number, y: number): void;\n}\n\n/** The Client interface represents an executable context such as a Worker, or a SharedWorker. Window clients are represented by the more-specific WindowClient. You can get Client/WindowClient objects from methods such as Clients.matchAll() and Clients.get(). */\ninterface Client {\n readonly frameType: FrameType;\n readonly id: string;\n readonly type: ClientTypes;\n readonly url: string;\n postMessage(message: any, transfer?: Transferable[]): void;\n}\n\ndeclare var Client: {\n prototype: Client;\n new(): Client;\n};\n\n/** Provides access to Client objects. Access it via self.clients within a service worker. */\ninterface Clients {\n claim(): Promise;\n get(id: string): Promise;\n matchAll(options?: ClientQueryOptions): Promise>;\n openWindow(url: string): Promise;\n}\n\ndeclare var Clients: {\n prototype: Clients;\n new(): Clients;\n};\n\n/** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */\ninterface CloseEvent extends Event {\n /**\n * Returns the WebSocket connection close code provided by the server.\n */\n readonly code: number;\n /**\n * Returns the WebSocket connection close reason provided by the server.\n */\n readonly reason: string;\n /**\n * Returns true if the connection closed cleanly; false otherwise.\n */\n readonly wasClean: boolean;\n}\n\ndeclare var CloseEvent: {\n prototype: CloseEvent;\n new(type: string, eventInitDict?: CloseEventInit): CloseEvent;\n};\n\ninterface ConcatParams extends Algorithm {\n algorithmId: Uint8Array;\n hash?: string | Algorithm;\n partyUInfo: Uint8Array;\n partyVInfo: Uint8Array;\n privateInfo?: Uint8Array;\n publicInfo?: Uint8Array;\n}\n\n/** Provides access to the browser's debugging console (e.g. the Web Console in Firefox). The specifics of how it works varies from browser to browser, but there is a de facto set of features that are typically provided. */\ninterface Console {\n memory: any;\n assert(condition?: boolean, message?: string, ...data: any[]): void;\n clear(): void;\n count(label?: string): void;\n debug(message?: any, ...optionalParams: any[]): void;\n dir(value?: any, ...optionalParams: any[]): void;\n dirxml(value: any): void;\n error(message?: any, ...optionalParams: any[]): void;\n exception(message?: string, ...optionalParams: any[]): void;\n group(groupTitle?: string, ...optionalParams: any[]): void;\n groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void;\n groupEnd(): void;\n info(message?: any, ...optionalParams: any[]): void;\n log(message?: any, ...optionalParams: any[]): void;\n markTimeline(label?: string): void;\n profile(reportName?: string): void;\n profileEnd(reportName?: string): void;\n table(...tabularData: any[]): void;\n time(label?: string): void;\n timeEnd(label?: string): void;\n timeStamp(label?: string): void;\n timeline(label?: string): void;\n timelineEnd(label?: string): void;\n trace(message?: any, ...optionalParams: any[]): void;\n warn(message?: any, ...optionalParams: any[]): void;\n}\n\ndeclare var Console: {\n prototype: Console;\n new(): Console;\n};\n\n/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */\ninterface CountQueuingStrategy extends QueuingStrategy {\n highWaterMark: number;\n size(chunk: any): 1;\n}\n\ndeclare var CountQueuingStrategy: {\n prototype: CountQueuingStrategy;\n new(options: { highWaterMark: number }): CountQueuingStrategy;\n};\n\n/** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */\ninterface Crypto {\n readonly subtle: SubtleCrypto;\n getRandomValues(array: T): T;\n}\n\ndeclare var Crypto: {\n prototype: Crypto;\n new(): Crypto;\n};\n\n/** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */\ninterface CryptoKey {\n readonly algorithm: KeyAlgorithm;\n readonly extractable: boolean;\n readonly type: KeyType;\n readonly usages: KeyUsage[];\n}\n\ndeclare var CryptoKey: {\n prototype: CryptoKey;\n new(): CryptoKey;\n};\n\ninterface CustomEvent extends Event {\n /**\n * Returns any custom data event was created with. Typically used for synthetic events.\n */\n readonly detail: T;\n initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: T): void;\n}\n\ndeclare var CustomEvent: {\n prototype: CustomEvent;\n new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;\n};\n\n/** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */\ninterface DOMException {\n readonly code: number;\n readonly message: string;\n readonly name: string;\n readonly ABORT_ERR: number;\n readonly DATA_CLONE_ERR: number;\n readonly DOMSTRING_SIZE_ERR: number;\n readonly HIERARCHY_REQUEST_ERR: number;\n readonly INDEX_SIZE_ERR: number;\n readonly INUSE_ATTRIBUTE_ERR: number;\n readonly INVALID_ACCESS_ERR: number;\n readonly INVALID_CHARACTER_ERR: number;\n readonly INVALID_MODIFICATION_ERR: number;\n readonly INVALID_NODE_TYPE_ERR: number;\n readonly INVALID_STATE_ERR: number;\n readonly NAMESPACE_ERR: number;\n readonly NETWORK_ERR: number;\n readonly NOT_FOUND_ERR: number;\n readonly NOT_SUPPORTED_ERR: number;\n readonly NO_DATA_ALLOWED_ERR: number;\n readonly NO_MODIFICATION_ALLOWED_ERR: number;\n readonly QUOTA_EXCEEDED_ERR: number;\n readonly SECURITY_ERR: number;\n readonly SYNTAX_ERR: number;\n readonly TIMEOUT_ERR: number;\n readonly TYPE_MISMATCH_ERR: number;\n readonly URL_MISMATCH_ERR: number;\n readonly VALIDATION_ERR: number;\n readonly WRONG_DOCUMENT_ERR: number;\n}\n\ndeclare var DOMException: {\n prototype: DOMException;\n new(message?: string, name?: string): DOMException;\n readonly ABORT_ERR: number;\n readonly DATA_CLONE_ERR: number;\n readonly DOMSTRING_SIZE_ERR: number;\n readonly HIERARCHY_REQUEST_ERR: number;\n readonly INDEX_SIZE_ERR: number;\n readonly INUSE_ATTRIBUTE_ERR: number;\n readonly INVALID_ACCESS_ERR: number;\n readonly INVALID_CHARACTER_ERR: number;\n readonly INVALID_MODIFICATION_ERR: number;\n readonly INVALID_NODE_TYPE_ERR: number;\n readonly INVALID_STATE_ERR: number;\n readonly NAMESPACE_ERR: number;\n readonly NETWORK_ERR: number;\n readonly NOT_FOUND_ERR: number;\n readonly NOT_SUPPORTED_ERR: number;\n readonly NO_DATA_ALLOWED_ERR: number;\n readonly NO_MODIFICATION_ALLOWED_ERR: number;\n readonly QUOTA_EXCEEDED_ERR: number;\n readonly SECURITY_ERR: number;\n readonly SYNTAX_ERR: number;\n readonly TIMEOUT_ERR: number;\n readonly TYPE_MISMATCH_ERR: number;\n readonly URL_MISMATCH_ERR: number;\n readonly VALIDATION_ERR: number;\n readonly WRONG_DOCUMENT_ERR: number;\n};\n\ninterface DOMMatrix extends DOMMatrixReadOnly {\n a: number;\n b: number;\n c: number;\n d: number;\n e: number;\n f: number;\n m11: number;\n m12: number;\n m13: number;\n m14: number;\n m21: number;\n m22: number;\n m23: number;\n m24: number;\n m31: number;\n m32: number;\n m33: number;\n m34: number;\n m41: number;\n m42: number;\n m43: number;\n m44: number;\n invertSelf(): DOMMatrix;\n multiplySelf(other?: DOMMatrixInit): DOMMatrix;\n preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;\n rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;\n rotateFromVectorSelf(x?: number, y?: number): DOMMatrix;\n rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;\n scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;\n scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;\n skewXSelf(sx?: number): DOMMatrix;\n skewYSelf(sy?: number): DOMMatrix;\n translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix;\n}\n\ndeclare var DOMMatrix: {\n prototype: DOMMatrix;\n new(init?: string | number[]): DOMMatrix;\n fromFloat32Array(array32: Float32Array): DOMMatrix;\n fromFloat64Array(array64: Float64Array): DOMMatrix;\n fromMatrix(other?: DOMMatrixInit): DOMMatrix;\n};\n\ninterface DOMMatrixReadOnly {\n readonly a: number;\n readonly b: number;\n readonly c: number;\n readonly d: number;\n readonly e: number;\n readonly f: number;\n readonly is2D: boolean;\n readonly isIdentity: boolean;\n readonly m11: number;\n readonly m12: number;\n readonly m13: number;\n readonly m14: number;\n readonly m21: number;\n readonly m22: number;\n readonly m23: number;\n readonly m24: number;\n readonly m31: number;\n readonly m32: number;\n readonly m33: number;\n readonly m34: number;\n readonly m41: number;\n readonly m42: number;\n readonly m43: number;\n readonly m44: number;\n flipX(): DOMMatrix;\n flipY(): DOMMatrix;\n inverse(): DOMMatrix;\n multiply(other?: DOMMatrixInit): DOMMatrix;\n rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;\n rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;\n rotateFromVector(x?: number, y?: number): DOMMatrix;\n scale(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;\n scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;\n /** @deprecated */\n scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix;\n skewX(sx?: number): DOMMatrix;\n skewY(sy?: number): DOMMatrix;\n toFloat32Array(): Float32Array;\n toFloat64Array(): Float64Array;\n toJSON(): any;\n transformPoint(point?: DOMPointInit): DOMPoint;\n translate(tx?: number, ty?: number, tz?: number): DOMMatrix;\n}\n\ndeclare var DOMMatrixReadOnly: {\n prototype: DOMMatrixReadOnly;\n new(init?: string | number[]): DOMMatrixReadOnly;\n fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly;\n fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly;\n fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly;\n};\n\ninterface DOMPoint extends DOMPointReadOnly {\n w: number;\n x: number;\n y: number;\n z: number;\n}\n\ndeclare var DOMPoint: {\n prototype: DOMPoint;\n new(x?: number, y?: number, z?: number, w?: number): DOMPoint;\n fromPoint(other?: DOMPointInit): DOMPoint;\n};\n\ninterface DOMPointReadOnly {\n readonly w: number;\n readonly x: number;\n readonly y: number;\n readonly z: number;\n matrixTransform(matrix?: DOMMatrixInit): DOMPoint;\n toJSON(): any;\n}\n\ndeclare var DOMPointReadOnly: {\n prototype: DOMPointReadOnly;\n new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly;\n fromPoint(other?: DOMPointInit): DOMPointReadOnly;\n};\n\ninterface DOMQuad {\n readonly p1: DOMPoint;\n readonly p2: DOMPoint;\n readonly p3: DOMPoint;\n readonly p4: DOMPoint;\n getBounds(): DOMRect;\n toJSON(): any;\n}\n\ndeclare var DOMQuad: {\n prototype: DOMQuad;\n new(p1?: DOMPointInit, p2?: DOMPointInit, p3?: DOMPointInit, p4?: DOMPointInit): DOMQuad;\n fromQuad(other?: DOMQuadInit): DOMQuad;\n fromRect(other?: DOMRectInit): DOMQuad;\n};\n\ninterface DOMRect extends DOMRectReadOnly {\n height: number;\n width: number;\n x: number;\n y: number;\n}\n\ndeclare var DOMRect: {\n prototype: DOMRect;\n new(x?: number, y?: number, width?: number, height?: number): DOMRect;\n fromRect(other?: DOMRectInit): DOMRect;\n};\n\ninterface DOMRectReadOnly {\n readonly bottom: number;\n readonly height: number;\n readonly left: number;\n readonly right: number;\n readonly top: number;\n readonly width: number;\n readonly x: number;\n readonly y: number;\n toJSON(): any;\n}\n\ndeclare var DOMRectReadOnly: {\n prototype: DOMRectReadOnly;\n new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly;\n fromRect(other?: DOMRectInit): DOMRectReadOnly;\n};\n\n/** A type returned by some APIs which contains a list of DOMString (strings). */\ninterface DOMStringList {\n /**\n * Returns the number of strings in strings.\n */\n readonly length: number;\n /**\n * Returns true if strings contains string, and false otherwise.\n */\n contains(string: string): boolean;\n /**\n * Returns the string with index index from strings.\n */\n item(index: number): string | null;\n [index: number]: string;\n}\n\ndeclare var DOMStringList: {\n prototype: DOMStringList;\n new(): DOMStringList;\n};\n\ninterface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {\n \"message\": MessageEvent;\n}\n\n/** (the Worker global scope) is accessible through the self keyword. Some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the JavaScript Reference. See also: Functions available to workers. */\ninterface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFrameProvider {\n onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;\n close(): void;\n postMessage(message: any, transfer: Transferable[]): void;\n postMessage(message: any, options?: PostMessageOptions): void;\n addEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var DedicatedWorkerGlobalScope: {\n prototype: DedicatedWorkerGlobalScope;\n new(): DedicatedWorkerGlobalScope;\n};\n\ninterface DhImportKeyParams extends Algorithm {\n generator: Uint8Array;\n prime: Uint8Array;\n}\n\ninterface DhKeyAlgorithm extends KeyAlgorithm {\n generator: Uint8Array;\n prime: Uint8Array;\n}\n\ninterface DhKeyDeriveParams extends Algorithm {\n public: CryptoKey;\n}\n\ninterface DhKeyGenParams extends Algorithm {\n generator: Uint8Array;\n prime: Uint8Array;\n}\n\ninterface EXT_blend_minmax {\n readonly MAX_EXT: GLenum;\n readonly MIN_EXT: GLenum;\n}\n\n/** The EXT_frag_depth extension is part of the WebGL API and enables to set a depth value of a fragment from within the fragment shader. */\ninterface EXT_frag_depth {\n}\n\ninterface EXT_sRGB {\n readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: GLenum;\n readonly SRGB8_ALPHA8_EXT: GLenum;\n readonly SRGB_ALPHA_EXT: GLenum;\n readonly SRGB_EXT: GLenum;\n}\n\ninterface EXT_shader_texture_lod {\n}\n\n/** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */\ninterface EXT_texture_filter_anisotropic {\n readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum;\n readonly TEXTURE_MAX_ANISOTROPY_EXT: GLenum;\n}\n\n/** Events providing information related to errors in scripts or in files. */\ninterface ErrorEvent extends Event {\n readonly colno: number;\n readonly error: any;\n readonly filename: string;\n readonly lineno: number;\n readonly message: string;\n}\n\ndeclare var ErrorEvent: {\n prototype: ErrorEvent;\n new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent;\n};\n\n/** An event which takes place in the DOM. */\ninterface Event {\n /**\n * Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise.\n */\n readonly bubbles: boolean;\n cancelBubble: boolean;\n /**\n * Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method.\n */\n readonly cancelable: boolean;\n /**\n * Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise.\n */\n readonly composed: boolean;\n /**\n * Returns the object whose event listener's callback is currently being invoked.\n */\n readonly currentTarget: EventTarget | null;\n /**\n * Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.\n */\n readonly defaultPrevented: boolean;\n /**\n * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.\n */\n readonly eventPhase: number;\n /**\n * Returns true if event was dispatched by the user agent, and false otherwise.\n */\n readonly isTrusted: boolean;\n returnValue: boolean;\n /** @deprecated */\n readonly srcElement: EventTarget | null;\n /**\n * Returns the object to which event is dispatched (its target).\n */\n readonly target: EventTarget | null;\n /**\n * Returns the event's timestamp as the number of milliseconds measured relative to the time origin.\n */\n readonly timeStamp: number;\n /**\n * Returns the type of event, e.g. \"click\", \"hashchange\", or \"submit\".\n */\n readonly type: string;\n /**\n * Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is \"closed\" that are not reachable from event's currentTarget.\n */\n composedPath(): EventTarget[];\n initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;\n /**\n * If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.\n */\n preventDefault(): void;\n /**\n * Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.\n */\n stopImmediatePropagation(): void;\n /**\n * When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.\n */\n stopPropagation(): void;\n readonly AT_TARGET: number;\n readonly BUBBLING_PHASE: number;\n readonly CAPTURING_PHASE: number;\n readonly NONE: number;\n}\n\ndeclare var Event: {\n prototype: Event;\n new(type: string, eventInitDict?: EventInit): Event;\n readonly AT_TARGET: number;\n readonly BUBBLING_PHASE: number;\n readonly CAPTURING_PHASE: number;\n readonly NONE: number;\n};\n\ninterface EventListenerObject {\n handleEvent(evt: Event): void;\n}\n\ninterface EventSourceEventMap {\n \"error\": Event;\n \"message\": MessageEvent;\n \"open\": Event;\n}\n\ninterface EventSource extends EventTarget {\n onerror: ((this: EventSource, ev: Event) => any) | null;\n onmessage: ((this: EventSource, ev: MessageEvent) => any) | null;\n onopen: ((this: EventSource, ev: Event) => any) | null;\n /**\n * Returns the state of this EventSource object's connection. It can have the values described below.\n */\n readonly readyState: number;\n /**\n * Returns the URL providing the event stream.\n */\n readonly url: string;\n /**\n * Returns true if the credentials mode for connection requests to the URL providing the event stream is set to \"include\", and false otherwise.\n */\n readonly withCredentials: boolean;\n /**\n * Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.\n */\n close(): void;\n readonly CLOSED: number;\n readonly CONNECTING: number;\n readonly OPEN: number;\n addEventListener(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var EventSource: {\n prototype: EventSource;\n new(url: string, eventSourceInitDict?: EventSourceInit): EventSource;\n readonly CLOSED: number;\n readonly CONNECTING: number;\n readonly OPEN: number;\n};\n\n/** EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. */\ninterface EventTarget {\n /**\n * Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.\n * \n * The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.\n * \n * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.\n * \n * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.\n * \n * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.\n * \n * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.\n */\n addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;\n /**\n * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.\n */\n dispatchEvent(event: Event): boolean;\n /**\n * Removes the event listener in target's event listener list with the same type, callback, and options.\n */\n removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;\n}\n\ndeclare var EventTarget: {\n prototype: EventTarget;\n new(): EventTarget;\n};\n\n/** Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries. */\ninterface ExtendableEvent extends Event {\n waitUntil(f: any): void;\n}\n\ndeclare var ExtendableEvent: {\n prototype: ExtendableEvent;\n new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent;\n};\n\n/** This ServiceWorker API interface represents the event object of a message event fired on a service worker (when a channel message is received on the ServiceWorkerGlobalScope from another context) — extends the lifetime of such events. */\ninterface ExtendableMessageEvent extends ExtendableEvent {\n readonly data: any;\n readonly lastEventId: string;\n readonly origin: string;\n readonly ports: ReadonlyArray;\n readonly source: Client | ServiceWorker | MessagePort | null;\n}\n\ndeclare var ExtendableMessageEvent: {\n prototype: ExtendableMessageEvent;\n new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent;\n};\n\n/** This is the event type for fetch events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the event.respondWith() method, which allows us to provide a response to this fetch. */\ninterface FetchEvent extends ExtendableEvent {\n readonly clientId: string;\n readonly preloadResponse: Promise;\n readonly replacesClientId: string;\n readonly request: Request;\n readonly resultingClientId: string;\n respondWith(r: Response | Promise): void;\n}\n\ndeclare var FetchEvent: {\n prototype: FetchEvent;\n new(type: string, eventInitDict: FetchEventInit): FetchEvent;\n};\n\n/** Provides information about files and allows JavaScript in a web page to access their content. */\ninterface File extends Blob {\n readonly lastModified: number;\n readonly name: string;\n}\n\ndeclare var File: {\n prototype: File;\n new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;\n};\n\n/** An object of this type is returned by the files property of the HTML element; this lets you access the list of files selected with the element. It's also used for a list of files dropped into web content when using the drag and drop API; see the DataTransfer object for details on this usage. */\ninterface FileList {\n readonly length: number;\n item(index: number): File | null;\n [index: number]: File;\n}\n\ndeclare var FileList: {\n prototype: FileList;\n new(): FileList;\n};\n\ninterface FileReaderEventMap {\n \"abort\": ProgressEvent;\n \"error\": ProgressEvent;\n \"load\": ProgressEvent;\n \"loadend\": ProgressEvent;\n \"loadstart\": ProgressEvent;\n \"progress\": ProgressEvent;\n}\n\n/** Lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read. */\ninterface FileReader extends EventTarget {\n readonly error: DOMException | null;\n onabort: ((this: FileReader, ev: ProgressEvent) => any) | null;\n onerror: ((this: FileReader, ev: ProgressEvent) => any) | null;\n onload: ((this: FileReader, ev: ProgressEvent) => any) | null;\n onloadend: ((this: FileReader, ev: ProgressEvent) => any) | null;\n onloadstart: ((this: FileReader, ev: ProgressEvent) => any) | null;\n onprogress: ((this: FileReader, ev: ProgressEvent) => any) | null;\n readonly readyState: number;\n readonly result: string | ArrayBuffer | null;\n abort(): void;\n readAsArrayBuffer(blob: Blob): void;\n readAsBinaryString(blob: Blob): void;\n readAsDataURL(blob: Blob): void;\n readAsText(blob: Blob, encoding?: string): void;\n readonly DONE: number;\n readonly EMPTY: number;\n readonly LOADING: number;\n addEventListener(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var FileReader: {\n prototype: FileReader;\n new(): FileReader;\n readonly DONE: number;\n readonly EMPTY: number;\n readonly LOADING: number;\n};\n\n/** Allows to read File or Blob objects in a synchronous way. */\ninterface FileReaderSync {\n readAsArrayBuffer(blob: Blob): ArrayBuffer;\n readAsBinaryString(blob: Blob): string;\n readAsDataURL(blob: Blob): string;\n readAsText(blob: Blob, encoding?: string): string;\n}\n\ndeclare var FileReaderSync: {\n prototype: FileReaderSync;\n new(): FileReaderSync;\n};\n\n/** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to \"multipart/form-data\". */\ninterface FormData {\n append(name: string, value: string | Blob, fileName?: string): void;\n delete(name: string): void;\n get(name: string): FormDataEntryValue | null;\n getAll(name: string): FormDataEntryValue[];\n has(name: string): boolean;\n set(name: string, value: string | Blob, fileName?: string): void;\n forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;\n}\n\ndeclare var FormData: {\n prototype: FormData;\n new(): FormData;\n};\n\ninterface GenericTransformStream {\n /**\n * Returns a readable stream whose chunks are strings resulting from running encoding's decoder on the chunks written to writable.\n */\n readonly readable: ReadableStream;\n /**\n * Returns a writable stream which accepts [AllowShared] BufferSource chunks and runs them through encoding's decoder before making them available to readable.\n * \n * Typically this will be used via the pipeThrough() method on a ReadableStream source.\n * \n * ```\n * var decoder = new TextDecoderStream(encoding);\n * byteReadable\n * .pipeThrough(decoder)\n * .pipeTo(textWritable);\n * ```\n * \n * If the error mode is \"fatal\" and encoding's decoder returns error, both readable and writable will be errored with a TypeError.\n */\n readonly writable: WritableStream;\n}\n\n/** This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.  You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence. */\ninterface Headers {\n append(name: string, value: string): void;\n delete(name: string): void;\n get(name: string): string | null;\n has(name: string): boolean;\n set(name: string, value: string): void;\n forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;\n}\n\ndeclare var Headers: {\n prototype: Headers;\n new(init?: HeadersInit): Headers;\n};\n\ninterface HkdfCtrParams extends Algorithm {\n context: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;\n hash: string | Algorithm;\n label: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;\n}\n\ninterface IDBArrayKey extends Array {\n}\n\n/** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. */\ninterface IDBCursor {\n /**\n * Returns the direction (\"next\", \"nextunique\", \"prev\" or \"prevunique\") of the cursor.\n */\n readonly direction: IDBCursorDirection;\n /**\n * Returns the key of the cursor. Throws a \"InvalidStateError\" DOMException if the cursor is advancing or is finished.\n */\n readonly key: IDBValidKey;\n /**\n * Returns the effective key of the cursor. Throws a \"InvalidStateError\" DOMException if the cursor is advancing or is finished.\n */\n readonly primaryKey: IDBValidKey;\n /**\n * Returns the IDBObjectStore or IDBIndex the cursor was opened from.\n */\n readonly source: IDBObjectStore | IDBIndex;\n /**\n * Advances the cursor through the next count records in range.\n */\n advance(count: number): void;\n /**\n * Advances the cursor to the next record in range.\n */\n continue(key?: IDBValidKey): void;\n /**\n * Advances the cursor to the next record in range matching or after key and primaryKey. Throws an \"InvalidAccessError\" DOMException if the source is not an index.\n */\n continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void;\n /**\n * Delete the record pointed at by the cursor with a new value.\n * \n * If successful, request's result will be undefined.\n */\n delete(): IDBRequest;\n /**\n * Updated the record pointed at by the cursor with a new value.\n * \n * Throws a \"DataError\" DOMException if the effective object store uses in-line keys and the key would have changed.\n * \n * If successful, request's result will be the record's key.\n */\n update(value: any): IDBRequest;\n}\n\ndeclare var IDBCursor: {\n prototype: IDBCursor;\n new(): IDBCursor;\n};\n\n/** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. It is the same as the IDBCursor, except that it includes the value property. */\ninterface IDBCursorWithValue extends IDBCursor {\n /**\n * Returns the cursor's current value.\n */\n readonly value: any;\n}\n\ndeclare var IDBCursorWithValue: {\n prototype: IDBCursorWithValue;\n new(): IDBCursorWithValue;\n};\n\ninterface IDBDatabaseEventMap {\n \"abort\": Event;\n \"close\": Event;\n \"error\": Event;\n \"versionchange\": IDBVersionChangeEvent;\n}\n\n/** This IndexedDB API interface provides a connection to a database; you can use an IDBDatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The interface provides the only way to get and manage versions of the database. */\ninterface IDBDatabase extends EventTarget {\n /**\n * Returns the name of the database.\n */\n readonly name: string;\n /**\n * Returns a list of the names of object stores in the database.\n */\n readonly objectStoreNames: DOMStringList;\n onabort: ((this: IDBDatabase, ev: Event) => any) | null;\n onclose: ((this: IDBDatabase, ev: Event) => any) | null;\n onerror: ((this: IDBDatabase, ev: Event) => any) | null;\n onversionchange: ((this: IDBDatabase, ev: IDBVersionChangeEvent) => any) | null;\n /**\n * Returns the version of the database.\n */\n readonly version: number;\n /**\n * Closes the connection once all running transactions have finished.\n */\n close(): void;\n /**\n * Creates a new object store with the given name and options and returns a new IDBObjectStore.\n * \n * Throws a \"InvalidStateError\" DOMException if not called within an upgrade transaction.\n */\n createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;\n /**\n * Deletes the object store with the given name.\n * \n * Throws a \"InvalidStateError\" DOMException if not called within an upgrade transaction.\n */\n deleteObjectStore(name: string): void;\n /**\n * Returns a new transaction with the given mode (\"readonly\" or \"readwrite\") and scope which can be a single object store name or an array of names.\n */\n transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction;\n addEventListener(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var IDBDatabase: {\n prototype: IDBDatabase;\n new(): IDBDatabase;\n};\n\n/** In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. For a full working example, see our To-do Notifications app (view example live.) */\ninterface IDBFactory {\n /**\n * Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 precedes key1, and 0 if the keys are equal.\n * \n * Throws a \"DataError\" DOMException if either input is not a valid key.\n */\n cmp(first: any, second: any): number;\n /**\n * Attempts to delete the named database. If the database already exists and there are open connections that don't close in response to a versionchange event, the request will be blocked until all they close. If the request is successful request's result will be null.\n */\n deleteDatabase(name: string): IDBOpenDBRequest;\n /**\n * Attempts to open a connection to the named database with the current version, or 1 if it does not already exist. If the request is successful request's result will be the connection.\n */\n open(name: string, version?: number): IDBOpenDBRequest;\n}\n\ndeclare var IDBFactory: {\n prototype: IDBFactory;\n new(): IDBFactory;\n};\n\n/** IDBIndex interface of the IndexedDB API provides asynchronous access to an index in a database. An index is a kind of object store for looking up records in another object store, called the referenced object store. You use this interface to retrieve data. */\ninterface IDBIndex {\n readonly keyPath: string | string[];\n readonly multiEntry: boolean;\n /**\n * Returns the name of the index.\n */\n name: string;\n /**\n * Returns the IDBObjectStore the index belongs to.\n */\n readonly objectStore: IDBObjectStore;\n readonly unique: boolean;\n /**\n * Retrieves the number of records matching the given key or key range in query.\n * \n * If successful, request's result will be the count.\n */\n count(key?: IDBValidKey | IDBKeyRange): IDBRequest;\n /**\n * Retrieves the value of the first record matching the given key or key range in query.\n * \n * If successful, request's result will be the value, or undefined if there was no matching record.\n */\n get(key: IDBValidKey | IDBKeyRange): IDBRequest;\n /**\n * Retrieves the values of the records matching the given key or key range in query (up to count if given).\n * \n * If successful, request's result will be an Array of the values.\n */\n getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest;\n /**\n * Retrieves the keys of records matching the given key or key range in query (up to count if given).\n * \n * If successful, request's result will be an Array of the keys.\n */\n getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest;\n /**\n * Retrieves the key of the first record matching the given key or key range in query.\n * \n * If successful, request's result will be the key, or undefined if there was no matching record.\n */\n getKey(key: IDBValidKey | IDBKeyRange): IDBRequest;\n /**\n * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in index are matched.\n * \n * If successful, request's result will be an IDBCursorWithValue, or null if there were no matching records.\n */\n openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest;\n /**\n * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in index are matched.\n * \n * If successful, request's result will be an IDBCursor, or null if there were no matching records.\n */\n openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest;\n}\n\ndeclare var IDBIndex: {\n prototype: IDBIndex;\n new(): IDBIndex;\n};\n\n/** A key range can be a single value or a range with upper and lower bounds or endpoints. If the key range has both upper and lower bounds, then it is bounded; if it has no bounds, it is unbounded. A bounded key range can either be open (the endpoints are excluded) or closed (the endpoints are included). To retrieve all keys within a certain range, you can use the following code constructs: */\ninterface IDBKeyRange {\n /**\n * Returns lower bound, or undefined if none.\n */\n readonly lower: any;\n /**\n * Returns true if the lower open flag is set, and false otherwise.\n */\n readonly lowerOpen: boolean;\n /**\n * Returns upper bound, or undefined if none.\n */\n readonly upper: any;\n /**\n * Returns true if the upper open flag is set, and false otherwise.\n */\n readonly upperOpen: boolean;\n /**\n * Returns true if key is included in the range, and false otherwise.\n */\n includes(key: any): boolean;\n}\n\ndeclare var IDBKeyRange: {\n prototype: IDBKeyRange;\n new(): IDBKeyRange;\n /**\n * Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range.\n */\n bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;\n /**\n * Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range.\n */\n lowerBound(lower: any, open?: boolean): IDBKeyRange;\n /**\n * Returns a new IDBKeyRange spanning only key.\n */\n only(value: any): IDBKeyRange;\n /**\n * Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range.\n */\n upperBound(upper: any, open?: boolean): IDBKeyRange;\n};\n\n/** This example shows a variety of different uses of object stores, from updating the data structure with IDBObjectStore.createIndex inside an onupgradeneeded function, to adding a new item to our object store with IDBObjectStore.add. For a full working example, see our To-do Notifications app (view example live.) */\ninterface IDBObjectStore {\n /**\n * Returns true if the store has a key generator, and false otherwise.\n */\n readonly autoIncrement: boolean;\n /**\n * Returns a list of the names of indexes in the store.\n */\n readonly indexNames: DOMStringList;\n /**\n * Returns the key path of the store, or null if none.\n */\n readonly keyPath: string | string[];\n /**\n * Returns the name of the store.\n */\n name: string;\n /**\n * Returns the associated transaction.\n */\n readonly transaction: IDBTransaction;\n /**\n * Adds or updates a record in store with the given value and key.\n * \n * If the store uses in-line keys and key is specified a \"DataError\" DOMException will be thrown.\n * \n * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a \"ConstraintError\" DOMException.\n * \n * If successful, request's result will be the record's key.\n */\n add(value: any, key?: IDBValidKey): IDBRequest;\n /**\n * Deletes all records in store.\n * \n * If successful, request's result will be undefined.\n */\n clear(): IDBRequest;\n /**\n * Retrieves the number of records matching the given key or key range in query.\n * \n * If successful, request's result will be the count.\n */\n count(key?: IDBValidKey | IDBKeyRange): IDBRequest;\n /**\n * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a \"ConstraintError\" DOMException.\n * \n * Throws an \"InvalidStateError\" DOMException if not called within an upgrade transaction.\n */\n createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex;\n /**\n * Deletes records in store with the given key or in the given key range in query.\n * \n * If successful, request's result will be undefined.\n */\n delete(key: IDBValidKey | IDBKeyRange): IDBRequest;\n /**\n * Deletes the index in store with the given name.\n * \n * Throws an \"InvalidStateError\" DOMException if not called within an upgrade transaction.\n */\n deleteIndex(name: string): void;\n /**\n * Retrieves the value of the first record matching the given key or key range in query.\n * \n * If successful, request's result will be the value, or undefined if there was no matching record.\n */\n get(query: IDBValidKey | IDBKeyRange): IDBRequest;\n /**\n * Retrieves the values of the records matching the given key or key range in query (up to count if given).\n * \n * If successful, request's result will be an Array of the values.\n */\n getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest;\n /**\n * Retrieves the keys of records matching the given key or key range in query (up to count if given).\n * \n * If successful, request's result will be an Array of the keys.\n */\n getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest;\n /**\n * Retrieves the key of the first record matching the given key or key range in query.\n * \n * If successful, request's result will be the key, or undefined if there was no matching record.\n */\n getKey(query: IDBValidKey | IDBKeyRange): IDBRequest;\n index(name: string): IDBIndex;\n /**\n * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched.\n * \n * If successful, request's result will be an IDBCursorWithValue pointing at the first matching record, or null if there were no matching records.\n */\n openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest;\n /**\n * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in store are matched.\n * \n * If successful, request's result will be an IDBCursor pointing at the first matching record, or null if there were no matching records.\n */\n openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest;\n /**\n * Adds or updates a record in store with the given value and key.\n * \n * If the store uses in-line keys and key is specified a \"DataError\" DOMException will be thrown.\n * \n * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a \"ConstraintError\" DOMException.\n * \n * If successful, request's result will be the record's key.\n */\n put(value: any, key?: IDBValidKey): IDBRequest;\n}\n\ndeclare var IDBObjectStore: {\n prototype: IDBObjectStore;\n new(): IDBObjectStore;\n};\n\ninterface IDBOpenDBRequestEventMap extends IDBRequestEventMap {\n \"blocked\": Event;\n \"upgradeneeded\": IDBVersionChangeEvent;\n}\n\n/** Also inherits methods from its parents IDBRequest and EventTarget. */\ninterface IDBOpenDBRequest extends IDBRequest {\n onblocked: ((this: IDBOpenDBRequest, ev: Event) => any) | null;\n onupgradeneeded: ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any) | null;\n addEventListener(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var IDBOpenDBRequest: {\n prototype: IDBOpenDBRequest;\n new(): IDBOpenDBRequest;\n};\n\ninterface IDBRequestEventMap {\n \"error\": Event;\n \"success\": Event;\n}\n\n/** The request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the IDBRequest instance. */\ninterface IDBRequest extends EventTarget {\n /**\n * When a request is completed, returns the error (a DOMException), or null if the request succeeded. Throws a \"InvalidStateError\" DOMException if the request is still pending.\n */\n readonly error: DOMException | null;\n onerror: ((this: IDBRequest, ev: Event) => any) | null;\n onsuccess: ((this: IDBRequest, ev: Event) => any) | null;\n /**\n * Returns \"pending\" until a request is complete, then returns \"done\".\n */\n readonly readyState: IDBRequestReadyState;\n /**\n * When a request is completed, returns the result, or undefined if the request failed. Throws a \"InvalidStateError\" DOMException if the request is still pending.\n */\n readonly result: T;\n /**\n * Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request.\n */\n readonly source: IDBObjectStore | IDBIndex | IDBCursor;\n /**\n * Returns the IDBTransaction the request was made within. If this as an open request, then it returns an upgrade transaction while it is running, or null otherwise.\n */\n readonly transaction: IDBTransaction | null;\n addEventListener(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var IDBRequest: {\n prototype: IDBRequest;\n new(): IDBRequest;\n};\n\ninterface IDBTransactionEventMap {\n \"abort\": Event;\n \"complete\": Event;\n \"error\": Event;\n}\n\ninterface IDBTransaction extends EventTarget {\n /**\n * Returns the transaction's connection.\n */\n readonly db: IDBDatabase;\n /**\n * If the transaction was aborted, returns the error (a DOMException) providing the reason.\n */\n readonly error: DOMException;\n /**\n * Returns the mode the transaction was created with (\"readonly\" or \"readwrite\"), or \"versionchange\" for an upgrade transaction.\n */\n readonly mode: IDBTransactionMode;\n /**\n * Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database.\n */\n readonly objectStoreNames: DOMStringList;\n onabort: ((this: IDBTransaction, ev: Event) => any) | null;\n oncomplete: ((this: IDBTransaction, ev: Event) => any) | null;\n onerror: ((this: IDBTransaction, ev: Event) => any) | null;\n /**\n * Aborts the transaction. All pending requests will fail with a \"AbortError\" DOMException and all changes made to the database will be reverted.\n */\n abort(): void;\n /**\n * Returns an IDBObjectStore in the transaction's scope.\n */\n objectStore(name: string): IDBObjectStore;\n addEventListener(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var IDBTransaction: {\n prototype: IDBTransaction;\n new(): IDBTransaction;\n};\n\n/** This IndexedDB API interface indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function. */\ninterface IDBVersionChangeEvent extends Event {\n readonly newVersion: number | null;\n readonly oldVersion: number;\n}\n\ndeclare var IDBVersionChangeEvent: {\n prototype: IDBVersionChangeEvent;\n new(type: string, eventInitDict?: IDBVersionChangeEventInit): IDBVersionChangeEvent;\n};\n\ninterface ImageBitmap {\n /**\n * Returns the intrinsic height of the image, in CSS pixels.\n */\n readonly height: number;\n /**\n * Returns the intrinsic width of the image, in CSS pixels.\n */\n readonly width: number;\n /**\n * Releases imageBitmap's underlying bitmap data.\n */\n close(): void;\n}\n\ndeclare var ImageBitmap: {\n prototype: ImageBitmap;\n new(): ImageBitmap;\n};\n\ninterface ImageBitmapOptions {\n colorSpaceConversion?: \"none\" | \"default\";\n imageOrientation?: \"none\" | \"flipY\";\n premultiplyAlpha?: \"none\" | \"premultiply\" | \"default\";\n resizeHeight?: number;\n resizeQuality?: \"pixelated\" | \"low\" | \"medium\" | \"high\";\n resizeWidth?: number;\n}\n\ninterface ImageBitmapRenderingContext {\n /**\n * Returns the canvas element that the context is bound to.\n */\n readonly canvas: OffscreenCanvas;\n /**\n * Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound.\n */\n transferFromImageBitmap(bitmap: ImageBitmap | null): void;\n}\n\ndeclare var ImageBitmapRenderingContext: {\n prototype: ImageBitmapRenderingContext;\n new(): ImageBitmapRenderingContext;\n};\n\n/** The underlying pixel data of an area of a element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */\ninterface ImageData {\n /**\n * Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255.\n */\n readonly data: Uint8ClampedArray;\n /**\n * Returns the actual dimensions of the data in the ImageData object, in pixels.\n */\n readonly height: number;\n /**\n * Returns the actual dimensions of the data in the ImageData object, in pixels.\n */\n readonly width: number;\n}\n\ndeclare var ImageData: {\n prototype: ImageData;\n new(width: number, height: number): ImageData;\n new(array: Uint8ClampedArray, width: number, height?: number): ImageData;\n};\n\n/** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */\ninterface MessageChannel {\n /**\n * Returns the first MessagePort object.\n */\n readonly port1: MessagePort;\n /**\n * Returns the second MessagePort object.\n */\n readonly port2: MessagePort;\n}\n\ndeclare var MessageChannel: {\n prototype: MessageChannel;\n new(): MessageChannel;\n};\n\n/** A message received by a target object. */\ninterface MessageEvent extends Event {\n /**\n * Returns the data of the message.\n */\n readonly data: any;\n /**\n * Returns the last event ID string, for server-sent events.\n */\n readonly lastEventId: string;\n /**\n * Returns the origin of the message, for server-sent events and cross-document messaging.\n */\n readonly origin: string;\n /**\n * Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging.\n */\n readonly ports: ReadonlyArray;\n /**\n * Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects.\n */\n readonly source: MessageEventSource | null;\n}\n\ndeclare var MessageEvent: {\n prototype: MessageEvent;\n new(type: string, eventInitDict?: MessageEventInit): MessageEvent;\n};\n\ninterface MessagePortEventMap {\n \"message\": MessageEvent;\n \"messageerror\": MessageEvent;\n}\n\n/** This Channel Messaging API interface represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other. */\ninterface MessagePort extends EventTarget {\n onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null;\n onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null;\n /**\n * Disconnects the port, so that it is no longer active.\n */\n close(): void;\n /**\n * Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.\n * \n * Throws a \"DataCloneError\" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.\n */\n postMessage(message: any, transfer: Transferable[]): void;\n postMessage(message: any, options?: PostMessageOptions): void;\n /**\n * Begins dispatching messages received on the port.\n */\n start(): void;\n addEventListener(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var MessagePort: {\n prototype: MessagePort;\n new(): MessagePort;\n};\n\ninterface NavigationPreloadManager {\n disable(): Promise;\n enable(): Promise;\n getState(): Promise;\n setHeaderValue(value: string): Promise;\n}\n\ndeclare var NavigationPreloadManager: {\n prototype: NavigationPreloadManager;\n new(): NavigationPreloadManager;\n};\n\ninterface NavigatorBeacon {\n sendBeacon(url: string, data?: Blob | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | FormData | string | null): boolean;\n}\n\ninterface NavigatorConcurrentHardware {\n readonly hardwareConcurrency: number;\n}\n\ninterface NavigatorID {\n readonly appCodeName: string;\n readonly appName: string;\n readonly appVersion: string;\n readonly platform: string;\n readonly product: string;\n readonly userAgent: string;\n}\n\ninterface NavigatorOnLine {\n readonly onLine: boolean;\n}\n\ninterface NavigatorStorage {\n readonly storage: StorageManager;\n}\n\ninterface NotificationEventMap {\n \"click\": Event;\n \"close\": Event;\n \"error\": Event;\n \"show\": Event;\n}\n\n/** This Notifications API interface is used to configure and display desktop notifications to the user. */\ninterface Notification extends EventTarget {\n readonly actions: ReadonlyArray;\n readonly badge: string;\n readonly body: string;\n readonly data: any;\n readonly dir: NotificationDirection;\n readonly icon: string;\n readonly image: string;\n readonly lang: string;\n onclick: ((this: Notification, ev: Event) => any) | null;\n onclose: ((this: Notification, ev: Event) => any) | null;\n onerror: ((this: Notification, ev: Event) => any) | null;\n onshow: ((this: Notification, ev: Event) => any) | null;\n readonly renotify: boolean;\n readonly requireInteraction: boolean;\n readonly silent: boolean;\n readonly tag: string;\n readonly timestamp: number;\n readonly title: string;\n readonly vibrate: ReadonlyArray;\n close(): void;\n addEventListener(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var Notification: {\n prototype: Notification;\n new(title: string, options?: NotificationOptions): Notification;\n readonly maxActions: number;\n readonly permission: NotificationPermission;\n};\n\n/** The parameter passed into the onnotificationclick handler, the NotificationEvent interface represents a notification click event that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. */\ninterface NotificationEvent extends ExtendableEvent {\n readonly action: string;\n readonly notification: Notification;\n}\n\ndeclare var NotificationEvent: {\n prototype: NotificationEvent;\n new(type: string, eventInitDict: NotificationEventInit): NotificationEvent;\n};\n\n/** The OES_element_index_uint extension is part of the WebGL API and adds support for gl.UNSIGNED_INT types to WebGLRenderingContext.drawElements(). */\ninterface OES_element_index_uint {\n}\n\n/** The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth. */\ninterface OES_standard_derivatives {\n readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: GLenum;\n}\n\n/** The OES_texture_float extension is part of the WebGL API and exposes floating-point pixel types for textures. */\ninterface OES_texture_float {\n}\n\n/** The OES_texture_float_linear extension is part of the WebGL API and allows linear filtering with floating-point pixel types for textures. */\ninterface OES_texture_float_linear {\n}\n\n/** The OES_texture_half_float extension is part of the WebGL API and adds texture formats with 16- (aka half float) and 32-bit floating-point components. */\ninterface OES_texture_half_float {\n readonly HALF_FLOAT_OES: GLenum;\n}\n\n/** The OES_texture_half_float_linear extension is part of the WebGL API and allows linear filtering with half floating-point pixel types for textures. */\ninterface OES_texture_half_float_linear {\n}\n\ninterface OES_vertex_array_object {\n bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;\n createVertexArrayOES(): WebGLVertexArrayObjectOES | null;\n deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;\n isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): GLboolean;\n readonly VERTEX_ARRAY_BINDING_OES: GLenum;\n}\n\ninterface OffscreenCanvas extends EventTarget {\n /**\n * These attributes return the dimensions of the OffscreenCanvas object's bitmap.\n * \n * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it).\n */\n height: number;\n /**\n * These attributes return the dimensions of the OffscreenCanvas object's bitmap.\n * \n * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it).\n */\n width: number;\n /**\n * Returns a promise that will fulfill with a new Blob object representing a file containing the image in the OffscreenCanvas object.\n * \n * The argument, if provided, is a dictionary that controls the encoding options of the image file to be created. The type field specifies the file format and has a default value of \"image/png\"; that type is also used if the requested type isn't supported. If the image format supports variable quality (such as \"image/jpeg\"), then the quality field is a number in the range 0.0 to 1.0 inclusive indicating the desired quality level for the resulting image.\n */\n convertToBlob(options?: ImageEncodeOptions): Promise;\n /**\n * Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: \"2d\", \"bitmaprenderer\", \"webgl\", or \"webgl2\". options is handled by that API.\n * \n * This specification defines the \"2d\" context below, which is similar but distinct from the \"2d\" context that is created from a canvas element. The WebGL specifications define the \"webgl\" and \"webgl2\" contexts. [WEBGL]\n * \n * Returns null if the canvas has already been initialized with another context type (e.g., trying to get a \"2d\" context after getting a \"webgl\" context).\n */\n getContext(contextId: \"2d\", options?: CanvasRenderingContext2DSettings): OffscreenCanvasRenderingContext2D | null;\n getContext(contextId: \"bitmaprenderer\", options?: ImageBitmapRenderingContextSettings): ImageBitmapRenderingContext | null;\n getContext(contextId: \"webgl\", options?: WebGLContextAttributes): WebGLRenderingContext | null;\n getContext(contextId: \"webgl2\", options?: WebGLContextAttributes): WebGL2RenderingContext | null;\n getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | null;\n /**\n * Returns a newly created ImageBitmap object with the image in the OffscreenCanvas object. The image in the OffscreenCanvas object is replaced with a new blank image.\n */\n transferToImageBitmap(): ImageBitmap;\n}\n\ndeclare var OffscreenCanvas: {\n prototype: OffscreenCanvas;\n new(width: number, height: number): OffscreenCanvas;\n};\n\ninterface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform {\n readonly canvas: OffscreenCanvas;\n commit(): void;\n}\n\ndeclare var OffscreenCanvasRenderingContext2D: {\n prototype: OffscreenCanvasRenderingContext2D;\n new(): OffscreenCanvasRenderingContext2D;\n};\n\n/** This Canvas 2D API interface is used to declare a path that can then be used on a CanvasRenderingContext2D object. The path methods of the CanvasRenderingContext2D interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired. */\ninterface Path2D extends CanvasPath {\n /**\n * Adds to the path the path given by the argument.\n */\n addPath(path: Path2D, transform?: DOMMatrix2DInit): void;\n}\n\ndeclare var Path2D: {\n prototype: Path2D;\n new(path?: Path2D | string): Path2D;\n};\n\ninterface PerformanceEventMap {\n \"resourcetimingbufferfull\": Event;\n}\n\n/** Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API. */\ninterface Performance extends EventTarget {\n onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null;\n readonly timeOrigin: number;\n clearMarks(markName?: string): void;\n clearMeasures(measureName?: string): void;\n clearResourceTimings(): void;\n getEntries(): PerformanceEntryList;\n getEntriesByName(name: string, type?: string): PerformanceEntryList;\n getEntriesByType(type: string): PerformanceEntryList;\n mark(markName: string): void;\n measure(measureName: string, startMark?: string, endMark?: string): void;\n now(): number;\n setResourceTimingBufferSize(maxSize: number): void;\n toJSON(): any;\n addEventListener(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var Performance: {\n prototype: Performance;\n new(): Performance;\n};\n\n/** Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the mark() method) at an explicit point in an application. Performance entries are also created in indirect ways such as loading a resource (such as an image). */\ninterface PerformanceEntry {\n readonly duration: number;\n readonly entryType: string;\n readonly name: string;\n readonly startTime: number;\n toJSON(): any;\n}\n\ndeclare var PerformanceEntry: {\n prototype: PerformanceEntry;\n new(): PerformanceEntry;\n};\n\n/** PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of \"mark\". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the browser's performance timeline. */\ninterface PerformanceMark extends PerformanceEntry {\n}\n\ndeclare var PerformanceMark: {\n prototype: PerformanceMark;\n new(): PerformanceMark;\n};\n\n/** PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of \"measure\". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline. */\ninterface PerformanceMeasure extends PerformanceEntry {\n}\n\ndeclare var PerformanceMeasure: {\n prototype: PerformanceMeasure;\n new(): PerformanceMeasure;\n};\n\ninterface PerformanceObserver {\n disconnect(): void;\n observe(options?: PerformanceObserverInit): void;\n takeRecords(): PerformanceEntryList;\n}\n\ndeclare var PerformanceObserver: {\n prototype: PerformanceObserver;\n new(callback: PerformanceObserverCallback): PerformanceObserver;\n readonly supportedEntryTypes: ReadonlyArray;\n};\n\ninterface PerformanceObserverEntryList {\n getEntries(): PerformanceEntryList;\n getEntriesByName(name: string, type?: string): PerformanceEntryList;\n getEntriesByType(type: string): PerformanceEntryList;\n}\n\ndeclare var PerformanceObserverEntryList: {\n prototype: PerformanceObserverEntryList;\n new(): PerformanceObserverEntryList;\n};\n\n/** Enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, , image, or script. */\ninterface PerformanceResourceTiming extends PerformanceEntry {\n readonly connectEnd: number;\n readonly connectStart: number;\n readonly decodedBodySize: number;\n readonly domainLookupEnd: number;\n readonly domainLookupStart: number;\n readonly encodedBodySize: number;\n readonly fetchStart: number;\n readonly initiatorType: string;\n readonly nextHopProtocol: string;\n readonly redirectEnd: number;\n readonly redirectStart: number;\n readonly requestStart: number;\n readonly responseEnd: number;\n readonly responseStart: number;\n readonly secureConnectionStart: number;\n readonly transferSize: number;\n readonly workerStart: number;\n toJSON(): any;\n}\n\ndeclare var PerformanceResourceTiming: {\n prototype: PerformanceResourceTiming;\n new(): PerformanceResourceTiming;\n};\n\ninterface PermissionStatusEventMap {\n \"change\": Event;\n}\n\ninterface PermissionStatus extends EventTarget {\n onchange: ((this: PermissionStatus, ev: Event) => any) | null;\n readonly state: PermissionState;\n addEventListener(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n removeEventListener(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | EventListenerOptions): void;\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare var PermissionStatus: {\n prototype: PermissionStatus;\n new(): PermissionStatus;\n};\n\ninterface Permissions {\n query(permissionDesc: PermissionDescriptor | DevicePermissionDescriptor | MidiPermissionDescriptor | PushPermissionDescriptor): Promise;\n}\n\ndeclare var Permissions: {\n prototype: Permissions;\n new(): Permissions;\n};\n\n/** Events measuring progress of an underlying process, like an HTTP request (for an XMLHttpRequest, or the loading of the underlying resource of an ,