/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ /// ///////////////////////////// /// Worker APIs ///////////////////////////// interface AddEventListenerOptions extends EventListenerOptions { once?: boolean; passive?: boolean; signal?: AbortSignal; } interface AesCbcParams extends Algorithm { iv: BufferSource; } interface AesCtrParams extends Algorithm { counter: BufferSource; length: number; } interface AesDerivedKeyParams extends Algorithm { length: number; } interface AesGcmParams extends Algorithm { additionalData?: BufferSource; iv: BufferSource; tagLength?: number; } interface AesKeyAlgorithm extends KeyAlgorithm { length: number; } interface AesKeyGenParams extends Algorithm { length: number; } interface Algorithm { name: string; } interface AudioConfiguration { bitrate?: number; channels?: string; contentType: string; samplerate?: number; spatialRendering?: boolean; } interface AvcEncoderConfig { format?: AvcBitstreamFormat; } interface BlobPropertyBag { endings?: EndingType; type?: string; } interface CSSMatrixComponentOptions { is2D?: boolean; } interface CSSNumericType { angle?: number; flex?: number; frequency?: number; length?: number; percent?: number; percentHint?: CSSNumericBaseType; resolution?: number; time?: number; } interface CacheQueryOptions { ignoreMethod?: boolean; ignoreSearch?: boolean; ignoreVary?: boolean; } interface ClientQueryOptions { includeUncontrolled?: boolean; type?: ClientTypes; } interface CloseEventInit extends EventInit { code?: number; reason?: string; wasClean?: boolean; } interface CryptoKeyPair { privateKey: CryptoKey; publicKey: CryptoKey; } interface CustomEventInit extends EventInit { detail?: T; } interface DOMMatrix2DInit { a?: number; b?: number; c?: number; d?: number; e?: number; f?: number; m11?: number; m12?: number; m21?: number; m22?: number; m41?: number; m42?: number; } interface DOMMatrixInit extends DOMMatrix2DInit { is2D?: boolean; m13?: number; m14?: number; m23?: number; m24?: number; m31?: number; m32?: number; m33?: number; m34?: number; m43?: number; m44?: number; } interface DOMPointInit { w?: number; x?: number; y?: number; z?: number; } interface DOMQuadInit { p1?: DOMPointInit; p2?: DOMPointInit; p3?: DOMPointInit; p4?: DOMPointInit; } interface DOMRectInit { height?: number; width?: number; x?: number; y?: number; } interface EcKeyGenParams extends Algorithm { namedCurve: NamedCurve; } interface EcKeyImportParams extends Algorithm { namedCurve: NamedCurve; } interface EcdhKeyDeriveParams extends Algorithm { public: CryptoKey; } interface EcdsaParams extends Algorithm { hash: HashAlgorithmIdentifier; } interface EncodedVideoChunkInit { data: AllowSharedBufferSource; duration?: number; timestamp: number; type: EncodedVideoChunkType; } interface EncodedVideoChunkMetadata { decoderConfig?: VideoDecoderConfig; } interface ErrorEventInit extends EventInit { colno?: number; error?: any; filename?: string; lineno?: number; message?: string; } interface EventInit { bubbles?: boolean; cancelable?: boolean; composed?: boolean; } interface EventListenerOptions { capture?: boolean; } interface EventSourceInit { withCredentials?: boolean; } interface ExtendableEventInit extends EventInit { } interface ExtendableMessageEventInit extends ExtendableEventInit { data?: any; lastEventId?: string; origin?: string; ports?: MessagePort[]; source?: Client | ServiceWorker | MessagePort | null; } interface FetchEventInit extends ExtendableEventInit { clientId?: string; handled?: Promise; preloadResponse?: Promise; replacesClientId?: string; request: Request; resultingClientId?: string; } interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } interface FileSystemCreateWritableOptions { keepExistingData?: boolean; } interface FileSystemGetDirectoryOptions { create?: boolean; } interface FileSystemGetFileOptions { create?: boolean; } interface FileSystemReadWriteOptions { at?: number; } interface FileSystemRemoveOptions { recursive?: boolean; } interface FontFaceDescriptors { ascentOverride?: string; descentOverride?: string; display?: FontDisplay; featureSettings?: string; lineGapOverride?: string; stretch?: string; style?: string; unicodeRange?: string; weight?: string; } interface FontFaceSetLoadEventInit extends EventInit { fontfaces?: FontFace[]; } interface GetNotificationOptions { tag?: string; } interface HkdfParams extends Algorithm { hash: HashAlgorithmIdentifier; info: BufferSource; salt: BufferSource; } interface HmacImportParams extends Algorithm { hash: HashAlgorithmIdentifier; length?: number; } interface HmacKeyGenParams extends Algorithm { hash: HashAlgorithmIdentifier; length?: number; } interface IDBDatabaseInfo { name?: string; version?: number; } interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; } interface IDBObjectStoreParameters { autoIncrement?: boolean; keyPath?: string | string[] | null; } interface IDBTransactionOptions { durability?: IDBTransactionDurability; } interface IDBVersionChangeEventInit extends EventInit { newVersion?: number | null; oldVersion?: number; } interface ImageBitmapOptions { colorSpaceConversion?: ColorSpaceConversion; imageOrientation?: ImageOrientation; premultiplyAlpha?: PremultiplyAlpha; resizeHeight?: number; resizeQuality?: ResizeQuality; resizeWidth?: number; } interface ImageBitmapRenderingContextSettings { alpha?: boolean; } interface ImageDataSettings { colorSpace?: PredefinedColorSpace; } interface ImageEncodeOptions { quality?: number; type?: string; } interface ImportMeta { url: string; } interface JsonWebKey { alg?: string; crv?: string; d?: string; dp?: string; dq?: string; e?: string; ext?: boolean; k?: string; key_ops?: string[]; kty?: string; n?: string; oth?: RsaOtherPrimesInfo[]; p?: string; q?: string; qi?: string; use?: string; x?: string; y?: string; } interface KeyAlgorithm { name: string; } interface LockInfo { clientId?: string; mode?: LockMode; name?: string; } interface LockManagerSnapshot { held?: LockInfo[]; pending?: LockInfo[]; } interface LockOptions { ifAvailable?: boolean; mode?: LockMode; signal?: AbortSignal; steal?: boolean; } interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo { configuration?: MediaDecodingConfiguration; } interface MediaCapabilitiesEncodingInfo extends MediaCapabilitiesInfo { configuration?: MediaEncodingConfiguration; } interface MediaCapabilitiesInfo { powerEfficient: boolean; smooth: boolean; supported: boolean; } interface MediaConfiguration { audio?: AudioConfiguration; video?: VideoConfiguration; } interface MediaDecodingConfiguration extends MediaConfiguration { type: MediaDecodingType; } interface MediaEncodingConfiguration extends MediaConfiguration { type: MediaEncodingType; } interface MessageEventInit extends EventInit { data?: T; lastEventId?: string; origin?: string; ports?: MessagePort[]; source?: MessageEventSource | null; } interface MultiCacheQueryOptions extends CacheQueryOptions { cacheName?: string; } interface NavigationPreloadState { enabled?: boolean; headerValue?: string; } interface NotificationEventInit extends ExtendableEventInit { action?: string; notification: Notification; } interface NotificationOptions { badge?: string; body?: string; data?: any; dir?: NotificationDirection; icon?: string; lang?: string; requireInteraction?: boolean; silent?: boolean | null; tag?: string; } interface Pbkdf2Params extends Algorithm { hash: HashAlgorithmIdentifier; iterations: number; salt: BufferSource; } interface PerformanceMarkOptions { detail?: any; startTime?: DOMHighResTimeStamp; } interface PerformanceMeasureOptions { detail?: any; duration?: DOMHighResTimeStamp; end?: string | DOMHighResTimeStamp; start?: string | DOMHighResTimeStamp; } interface PerformanceObserverInit { buffered?: boolean; entryTypes?: string[]; type?: string; } interface PermissionDescriptor { name: PermissionName; } interface PlaneLayout { offset: number; stride: number; } interface ProgressEventInit extends EventInit { lengthComputable?: boolean; loaded?: number; total?: number; } interface PromiseRejectionEventInit extends EventInit { promise: Promise; reason?: any; } interface PushEventInit extends ExtendableEventInit { data?: PushMessageDataInit; } interface PushSubscriptionJSON { endpoint?: string; expirationTime?: EpochTimeStamp | null; keys?: Record; } interface PushSubscriptionOptionsInit { applicationServerKey?: BufferSource | string | null; userVisibleOnly?: boolean; } interface QueuingStrategy { highWaterMark?: number; size?: QueuingStrategySize; } interface QueuingStrategyInit { /** * Creates a new ByteLengthQueuingStrategy with the provided high water mark. * * Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw. */ highWaterMark: number; } interface RTCEncodedAudioFrameMetadata { contributingSources?: number[]; payloadType?: number; sequenceNumber?: number; synchronizationSource?: number; } interface RTCEncodedVideoFrameMetadata { contributingSources?: number[]; dependencies?: number[]; frameId?: number; height?: number; payloadType?: number; spatialIndex?: number; synchronizationSource?: number; temporalIndex?: number; timestamp?: number; width?: number; } interface ReadableStreamGetReaderOptions { /** * Creates a ReadableStreamBYOBReader and locks the stream to the new reader. * * This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation. */ mode?: ReadableStreamReaderMode; } interface ReadableStreamReadDoneResult { done: true; value?: T; } interface ReadableStreamReadValueResult { done: false; value: T; } interface ReadableWritablePair { readable: ReadableStream; /** * Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use. * * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader. */ writable: WritableStream; } interface RegistrationOptions { scope?: string; type?: WorkerType; updateViaCache?: ServiceWorkerUpdateViaCache; } interface ReportingObserverOptions { buffered?: boolean; types?: string[]; } interface RequestInit { /** A BodyInit object or null to set request's body. */ body?: BodyInit | null; /** A string indicating how the request will interact with the browser's cache to set request's cache. */ cache?: RequestCache; /** 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. */ credentials?: RequestCredentials; /** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */ headers?: HeadersInit; /** A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */ integrity?: string; /** A boolean to set request's keepalive. */ keepalive?: boolean; /** A string to set request's method. */ method?: string; /** A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */ mode?: RequestMode; priority?: RequestPriority; /** 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. */ redirect?: RequestRedirect; /** A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. */ referrer?: string; /** A referrer policy to set request's referrerPolicy. */ referrerPolicy?: ReferrerPolicy; /** An AbortSignal to set request's signal. */ signal?: AbortSignal | null; /** Can only be null. Used to disassociate request from any Window. */ window?: null; } interface ResponseInit { headers?: HeadersInit; status?: number; statusText?: string; } interface RsaHashedImportParams extends Algorithm { hash: HashAlgorithmIdentifier; } interface RsaHashedKeyGenParams extends RsaKeyGenParams { hash: HashAlgorithmIdentifier; } interface RsaKeyGenParams extends Algorithm { modulusLength: number; publicExponent: BigInteger; } interface RsaOaepParams extends Algorithm { label?: BufferSource; } interface RsaOtherPrimesInfo { d?: string; r?: string; t?: string; } interface RsaPssParams extends Algorithm { saltLength: number; } interface SecurityPolicyViolationEventInit extends EventInit { blockedURI?: string; columnNumber?: number; disposition: SecurityPolicyViolationEventDisposition; documentURI: string; effectiveDirective: string; lineNumber?: number; originalPolicy: string; referrer?: string; sample?: string; sourceFile?: string; statusCode: number; violatedDirective: string; } interface StorageEstimate { quota?: number; usage?: number; } interface StreamPipeOptions { preventAbort?: boolean; preventCancel?: boolean; /** * Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered. * * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader. * * Errors and closures of the source and destination streams propagate as follows: * * An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination. * * An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source. * * When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error. * * If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source. * * The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set. */ preventClose?: boolean; signal?: AbortSignal; } interface StructuredSerializeOptions { transfer?: Transferable[]; } interface TextDecodeOptions { stream?: boolean; } interface TextDecoderOptions { fatal?: boolean; ignoreBOM?: boolean; } interface TextEncoderEncodeIntoResult { read: number; written: number; } interface Transformer { flush?: TransformerFlushCallback; readableType?: undefined; start?: TransformerStartCallback; transform?: TransformerTransformCallback; writableType?: undefined; } interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; pull?: (controller: ReadableByteStreamController) => void | PromiseLike; start?: (controller: ReadableByteStreamController) => any; type: "bytes"; } interface UnderlyingDefaultSource { cancel?: UnderlyingSourceCancelCallback; pull?: (controller: ReadableStreamDefaultController) => void | PromiseLike; start?: (controller: ReadableStreamDefaultController) => any; type?: undefined; } interface UnderlyingSink { abort?: UnderlyingSinkAbortCallback; close?: UnderlyingSinkCloseCallback; start?: UnderlyingSinkStartCallback; type?: undefined; write?: UnderlyingSinkWriteCallback; } interface UnderlyingSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; pull?: UnderlyingSourcePullCallback; start?: UnderlyingSourceStartCallback; type?: ReadableStreamType; } interface VideoColorSpaceInit { fullRange?: boolean | null; matrix?: VideoMatrixCoefficients | null; primaries?: VideoColorPrimaries | null; transfer?: VideoTransferCharacteristics | null; } interface VideoConfiguration { bitrate: number; colorGamut?: ColorGamut; contentType: string; framerate: number; hdrMetadataType?: HdrMetadataType; height: number; scalabilityMode?: string; transferFunction?: TransferFunction; width: number; } interface VideoDecoderConfig { codec: string; codedHeight?: number; codedWidth?: number; colorSpace?: VideoColorSpaceInit; description?: AllowSharedBufferSource; displayAspectHeight?: number; displayAspectWidth?: number; hardwareAcceleration?: HardwareAcceleration; optimizeForLatency?: boolean; } interface VideoDecoderInit { error: WebCodecsErrorCallback; output: VideoFrameOutputCallback; } interface VideoDecoderSupport { config?: VideoDecoderConfig; supported?: boolean; } interface VideoEncoderConfig { alpha?: AlphaOption; avc?: AvcEncoderConfig; bitrate?: number; bitrateMode?: VideoEncoderBitrateMode; codec: string; displayHeight?: number; displayWidth?: number; framerate?: number; hardwareAcceleration?: HardwareAcceleration; height: number; latencyMode?: LatencyMode; scalabilityMode?: string; width: number; } interface VideoEncoderEncodeOptions { keyFrame?: boolean; } interface VideoEncoderInit { error: WebCodecsErrorCallback; output: EncodedVideoChunkOutputCallback; } interface VideoEncoderSupport { config?: VideoEncoderConfig; supported?: boolean; } interface VideoFrameBufferInit { codedHeight: number; codedWidth: number; colorSpace?: VideoColorSpaceInit; displayHeight?: number; displayWidth?: number; duration?: number; format: VideoPixelFormat; layout?: PlaneLayout[]; timestamp: number; visibleRect?: DOMRectInit; } interface VideoFrameCopyToOptions { layout?: PlaneLayout[]; rect?: DOMRectInit; } interface VideoFrameInit { alpha?: AlphaOption; displayHeight?: number; displayWidth?: number; duration?: number; timestamp?: number; visibleRect?: DOMRectInit; } interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; depth?: boolean; desynchronized?: boolean; failIfMajorPerformanceCaveat?: boolean; powerPreference?: WebGLPowerPreference; premultipliedAlpha?: boolean; preserveDrawingBuffer?: boolean; stencil?: boolean; } interface WebGLContextEventInit extends EventInit { statusMessage?: string; } interface WebTransportCloseInfo { closeCode?: number; reason?: string; } interface WebTransportErrorOptions { source?: WebTransportErrorSource; streamErrorCode?: number | null; } interface WebTransportHash { algorithm?: string; value?: BufferSource; } interface WebTransportOptions { allowPooling?: boolean; congestionControl?: WebTransportCongestionControl; requireUnreliable?: boolean; serverCertificateHashes?: WebTransportHash[]; } interface WebTransportSendStreamOptions { sendOrder?: number; } interface WorkerOptions { credentials?: RequestCredentials; name?: string; type?: WorkerType; } interface WriteParams { data?: BufferSource | Blob | string | null; position?: number | null; size?: number | null; type: WriteCommandType; } /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays) */ interface ANGLE_instanced_arrays { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays/drawArraysInstancedANGLE) */ drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays/drawElementsInstancedANGLE) */ drawElementsInstancedANGLE(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, primcount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays/vertexAttribDivisorANGLE) */ vertexAttribDivisorANGLE(index: GLuint, divisor: GLuint): void; readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: 0x88FE; } /** * A controller object that allows you to abort one or more DOM requests as and when desired. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController) */ interface AbortController { /** * Returns the AbortSignal object associated with this object. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/signal) */ readonly signal: AbortSignal; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/abort) */ abort(reason?: any): void; } declare var AbortController: { prototype: AbortController; new(): AbortController; }; interface AbortSignalEventMap { "abort": Event; } /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal) */ interface AbortSignal extends EventTarget { /** * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted) */ readonly aborted: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */ onabort: ((this: AbortSignal, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */ readonly reason: any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */ throwIfAborted(): void; addEventListener(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var AbortSignal: { prototype: AbortSignal; new(): AbortSignal; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */ abort(reason?: any): AbortSignal; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */ timeout(milliseconds: number): AbortSignal; }; interface AbstractWorkerEventMap { "error": ErrorEvent; } interface AbstractWorker { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorker/error_event) */ onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null; addEventListener(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } interface AnimationFrameProvider { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame) */ cancelAnimationFrame(handle: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame) */ requestAnimationFrame(callback: FrameRequestCallback): number; } /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob) */ interface Blob { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */ readonly size: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */ readonly type: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */ arrayBuffer(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */ slice(start?: number, end?: number, contentType?: string): Blob; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */ stream(): ReadableStream; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */ text(): Promise; } declare var Blob: { prototype: Blob; new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; }; interface Body { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */ readonly body: ReadableStream | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */ readonly bodyUsed: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */ arrayBuffer(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */ blob(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */ formData(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */ json(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */ text(): Promise; } interface BroadcastChannelEventMap { "message": MessageEvent; "messageerror": MessageEvent; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BroadcastChannel) */ interface BroadcastChannel extends EventTarget { /** * Returns the channel name (as passed to the constructor). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BroadcastChannel/name) */ readonly name: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BroadcastChannel/message_event) */ onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BroadcastChannel/messageerror_event) */ onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null; /** * Closes the BroadcastChannel object, opening it up to garbage collection. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BroadcastChannel/close) */ close(): void; /** * Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BroadcastChannel/postMessage) */ postMessage(message: any): void; addEventListener(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var BroadcastChannel: { prototype: BroadcastChannel; new(name: string): BroadcastChannel; }; /** * This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy) */ interface ByteLengthQueuingStrategy extends QueuingStrategy { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */ readonly highWaterMark: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */ readonly size: QueuingStrategySize; } declare var ByteLengthQueuingStrategy: { prototype: ByteLengthQueuingStrategy; new(init: QueuingStrategyInit): ByteLengthQueuingStrategy; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImageValue) */ interface CSSImageValue extends CSSStyleValue { } declare var CSSImageValue: { prototype: CSSImageValue; new(): CSSImageValue; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeywordValue) */ interface CSSKeywordValue extends CSSStyleValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeywordValue/value) */ value: string; } declare var CSSKeywordValue: { prototype: CSSKeywordValue; new(value: string): CSSKeywordValue; }; interface CSSMathClamp extends CSSMathValue { readonly lower: CSSNumericValue; readonly upper: CSSNumericValue; readonly value: CSSNumericValue; } declare var CSSMathClamp: { prototype: CSSMathClamp; new(lower: CSSNumberish, value: CSSNumberish, upper: CSSNumberish): CSSMathClamp; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathInvert) */ interface CSSMathInvert extends CSSMathValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathInvert/value) */ readonly value: CSSNumericValue; } declare var CSSMathInvert: { prototype: CSSMathInvert; new(arg: CSSNumberish): CSSMathInvert; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMax) */ interface CSSMathMax extends CSSMathValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMax/values) */ readonly values: CSSNumericArray; } declare var CSSMathMax: { prototype: CSSMathMax; new(...args: CSSNumberish[]): CSSMathMax; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMin) */ interface CSSMathMin extends CSSMathValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMin/values) */ readonly values: CSSNumericArray; } declare var CSSMathMin: { prototype: CSSMathMin; new(...args: CSSNumberish[]): CSSMathMin; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathNegate) */ interface CSSMathNegate extends CSSMathValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathNegate/value) */ readonly value: CSSNumericValue; } declare var CSSMathNegate: { prototype: CSSMathNegate; new(arg: CSSNumberish): CSSMathNegate; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathProduct) */ interface CSSMathProduct extends CSSMathValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathProduct/values) */ readonly values: CSSNumericArray; } declare var CSSMathProduct: { prototype: CSSMathProduct; new(...args: CSSNumberish[]): CSSMathProduct; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathSum) */ interface CSSMathSum extends CSSMathValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathSum/values) */ readonly values: CSSNumericArray; } declare var CSSMathSum: { prototype: CSSMathSum; new(...args: CSSNumberish[]): CSSMathSum; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathValue) */ interface CSSMathValue extends CSSNumericValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathValue/operator) */ readonly operator: CSSMathOperator; } declare var CSSMathValue: { prototype: CSSMathValue; new(): CSSMathValue; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMatrixComponent) */ interface CSSMatrixComponent extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMatrixComponent/matrix) */ matrix: DOMMatrix; } declare var CSSMatrixComponent: { prototype: CSSMatrixComponent; new(matrix: DOMMatrixReadOnly, options?: CSSMatrixComponentOptions): CSSMatrixComponent; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericArray) */ interface CSSNumericArray { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericArray/length) */ readonly length: number; forEach(callbackfn: (value: CSSNumericValue, key: number, parent: CSSNumericArray) => void, thisArg?: any): void; [index: number]: CSSNumericValue; } declare var CSSNumericArray: { prototype: CSSNumericArray; new(): CSSNumericArray; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue) */ interface CSSNumericValue extends CSSStyleValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/add) */ add(...values: CSSNumberish[]): CSSNumericValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/div) */ div(...values: CSSNumberish[]): CSSNumericValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/equals) */ equals(...value: CSSNumberish[]): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/max) */ max(...values: CSSNumberish[]): CSSNumericValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/min) */ min(...values: CSSNumberish[]): CSSNumericValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/mul) */ mul(...values: CSSNumberish[]): CSSNumericValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/sub) */ sub(...values: CSSNumberish[]): CSSNumericValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/to) */ to(unit: string): CSSUnitValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/toSum) */ toSum(...units: string[]): CSSMathSum; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/type) */ type(): CSSNumericType; } declare var CSSNumericValue: { prototype: CSSNumericValue; new(): CSSNumericValue; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPerspective) */ interface CSSPerspective extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPerspective/length) */ length: CSSPerspectiveValue; } declare var CSSPerspective: { prototype: CSSPerspective; new(length: CSSPerspectiveValue): CSSPerspective; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate) */ interface CSSRotate extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate/angle) */ angle: CSSNumericValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate/x) */ x: CSSNumberish; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate/y) */ y: CSSNumberish; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate/z) */ z: CSSNumberish; } declare var CSSRotate: { prototype: CSSRotate; new(angle: CSSNumericValue): CSSRotate; new(x: CSSNumberish, y: CSSNumberish, z: CSSNumberish, angle: CSSNumericValue): CSSRotate; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScale) */ interface CSSScale extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScale/x) */ x: CSSNumberish; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScale/y) */ y: CSSNumberish; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScale/z) */ z: CSSNumberish; } declare var CSSScale: { prototype: CSSScale; new(x: CSSNumberish, y: CSSNumberish, z?: CSSNumberish): CSSScale; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkew) */ interface CSSSkew extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkew/ax) */ ax: CSSNumericValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkew/ay) */ ay: CSSNumericValue; } declare var CSSSkew: { prototype: CSSSkew; new(ax: CSSNumericValue, ay: CSSNumericValue): CSSSkew; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewX) */ interface CSSSkewX extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewX/ax) */ ax: CSSNumericValue; } declare var CSSSkewX: { prototype: CSSSkewX; new(ax: CSSNumericValue): CSSSkewX; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewY) */ interface CSSSkewY extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewY/ay) */ ay: CSSNumericValue; } declare var CSSSkewY: { prototype: CSSSkewY; new(ay: CSSNumericValue): CSSSkewY; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue) */ interface CSSStyleValue { toString(): string; } declare var CSSStyleValue: { prototype: CSSStyleValue; new(): CSSStyleValue; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformComponent) */ interface CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformComponent/is2D) */ is2D: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformComponent/toMatrix) */ toMatrix(): DOMMatrix; toString(): string; } declare var CSSTransformComponent: { prototype: CSSTransformComponent; new(): CSSTransformComponent; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformValue) */ interface CSSTransformValue extends CSSStyleValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformValue/is2D) */ readonly is2D: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformValue/length) */ readonly length: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformValue/toMatrix) */ toMatrix(): DOMMatrix; forEach(callbackfn: (value: CSSTransformComponent, key: number, parent: CSSTransformValue) => void, thisArg?: any): void; [index: number]: CSSTransformComponent; } declare var CSSTransformValue: { prototype: CSSTransformValue; new(transforms: CSSTransformComponent[]): CSSTransformValue; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTranslate) */ interface CSSTranslate extends CSSTransformComponent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTranslate/x) */ x: CSSNumericValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTranslate/y) */ y: CSSNumericValue; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTranslate/z) */ z: CSSNumericValue; } declare var CSSTranslate: { prototype: CSSTranslate; new(x: CSSNumericValue, y: CSSNumericValue, z?: CSSNumericValue): CSSTranslate; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnitValue) */ interface CSSUnitValue extends CSSNumericValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnitValue/unit) */ readonly unit: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnitValue/value) */ value: number; } declare var CSSUnitValue: { prototype: CSSUnitValue; new(value: number, unit: string): CSSUnitValue; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnparsedValue) */ interface CSSUnparsedValue extends CSSStyleValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnparsedValue/length) */ readonly length: number; forEach(callbackfn: (value: CSSUnparsedSegment, key: number, parent: CSSUnparsedValue) => void, thisArg?: any): void; [index: number]: CSSUnparsedSegment; } declare var CSSUnparsedValue: { prototype: CSSUnparsedValue; new(members: CSSUnparsedSegment[]): CSSUnparsedValue; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSVariableReferenceValue) */ interface CSSVariableReferenceValue { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSVariableReferenceValue/fallback) */ readonly fallback: CSSUnparsedValue | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSVariableReferenceValue/variable) */ variable: string; } declare var CSSVariableReferenceValue: { prototype: CSSVariableReferenceValue; new(variable: string, fallback?: CSSUnparsedValue | null): CSSVariableReferenceValue; }; /** * 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. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache) */ interface Cache { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/add) */ add(request: RequestInfo | URL): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) */ addAll(requests: RequestInfo[]): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/delete) */ delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/keys) */ keys(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/match) */ match(request: RequestInfo | URL, options?: CacheQueryOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/matchAll) */ matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/put) */ put(request: RequestInfo | URL, response: Response): Promise; } declare var Cache: { prototype: Cache; new(): Cache; }; /** * The storage for Cache objects. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage) */ interface CacheStorage { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/delete) */ delete(cacheName: string): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/has) */ has(cacheName: string): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/keys) */ keys(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/match) */ match(request: RequestInfo | URL, options?: MultiCacheQueryOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */ open(cacheName: string): Promise; } declare var CacheStorage: { prototype: CacheStorage; new(): CacheStorage; }; interface CanvasCompositing { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/globalAlpha) */ globalAlpha: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation) */ globalCompositeOperation: GlobalCompositeOperation; } interface CanvasDrawImage { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage) */ drawImage(image: CanvasImageSource, dx: number, dy: number): void; drawImage(image: CanvasImageSource, dx: number, dy: number, dw: number, dh: number): void; drawImage(image: CanvasImageSource, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void; } interface CanvasDrawPath { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/beginPath) */ beginPath(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clip) */ clip(fillRule?: CanvasFillRule): void; clip(path: Path2D, fillRule?: CanvasFillRule): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fill) */ fill(fillRule?: CanvasFillRule): void; fill(path: Path2D, fillRule?: CanvasFillRule): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInPath) */ isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean; isPointInPath(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInStroke) */ isPointInStroke(x: number, y: number): boolean; isPointInStroke(path: Path2D, x: number, y: number): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/stroke) */ stroke(): void; stroke(path: Path2D): void; } interface CanvasFillStrokeStyles { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillStyle) */ fillStyle: string | CanvasGradient | CanvasPattern; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/strokeStyle) */ strokeStyle: string | CanvasGradient | CanvasPattern; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createConicGradient) */ createConicGradient(startAngle: number, x: number, y: number): CanvasGradient; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createLinearGradient) */ createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern) */ createPattern(image: CanvasImageSource, repetition: string | null): CanvasPattern | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createRadialGradient) */ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; } interface CanvasFilters { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/filter) */ filter: string; } /** * An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasGradient) */ interface CanvasGradient { /** * 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. * * Throws an "IndexSizeError" DOMException if the offset is out of range. Throws a "SyntaxError" DOMException if the color cannot be parsed. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasGradient/addColorStop) */ addColorStop(offset: number, color: string): void; } declare var CanvasGradient: { prototype: CanvasGradient; new(): CanvasGradient; }; interface CanvasImageData { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createImageData) */ createImageData(sw: number, sh: number, settings?: ImageDataSettings): ImageData; createImageData(imagedata: ImageData): ImageData; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getImageData) */ getImageData(sx: number, sy: number, sw: number, sh: number, settings?: ImageDataSettings): ImageData; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/putImageData) */ putImageData(imagedata: ImageData, dx: number, dy: number): void; putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void; } interface CanvasImageSmoothing { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled) */ imageSmoothingEnabled: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/imageSmoothingQuality) */ imageSmoothingQuality: ImageSmoothingQuality; } interface CanvasPath { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/arc) */ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/arcTo) */ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo) */ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/closePath) */ closePath(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/ellipse) */ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/lineTo) */ lineTo(x: number, y: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/moveTo) */ moveTo(x: number, y: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/quadraticCurveTo) */ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/rect) */ rect(x: number, y: number, w: number, h: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect) */ roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | (number | DOMPointInit)[]): void; } interface CanvasPathDrawingStyles { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/lineCap) */ lineCap: CanvasLineCap; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/lineDashOffset) */ lineDashOffset: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/lineJoin) */ lineJoin: CanvasLineJoin; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/lineWidth) */ lineWidth: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/miterLimit) */ miterLimit: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getLineDash) */ getLineDash(): number[]; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash) */ setLineDash(segments: number[]): void; } /** * An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasPattern) */ interface CanvasPattern { /** * Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasPattern/setTransform) */ setTransform(transform?: DOMMatrix2DInit): void; } declare var CanvasPattern: { prototype: CanvasPattern; new(): CanvasPattern; }; interface CanvasRect { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clearRect) */ clearRect(x: number, y: number, w: number, h: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillRect) */ fillRect(x: number, y: number, w: number, h: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/strokeRect) */ strokeRect(x: number, y: number, w: number, h: number): void; } interface CanvasShadowStyles { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/shadowBlur) */ shadowBlur: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/shadowColor) */ shadowColor: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/shadowOffsetX) */ shadowOffsetX: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/shadowOffsetY) */ shadowOffsetY: number; } interface CanvasState { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/reset) */ reset(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/restore) */ restore(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/save) */ save(): void; } interface CanvasText { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillText) */ fillText(text: string, x: number, y: number, maxWidth?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/measureText) */ measureText(text: string): TextMetrics; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/strokeText) */ strokeText(text: string, x: number, y: number, maxWidth?: number): void; } interface CanvasTextDrawingStyles { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/direction) */ direction: CanvasDirection; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/font) */ font: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontKerning) */ fontKerning: CanvasFontKerning; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontStretch) */ fontStretch: CanvasFontStretch; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontVariantCaps) */ fontVariantCaps: CanvasFontVariantCaps; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/letterSpacing) */ letterSpacing: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textAlign) */ textAlign: CanvasTextAlign; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textBaseline) */ textBaseline: CanvasTextBaseline; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textRendering) */ textRendering: CanvasTextRendering; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/wordSpacing) */ wordSpacing: string; } interface CanvasTransform { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getTransform) */ getTransform(): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/resetTransform) */ resetTransform(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/rotate) */ rotate(angle: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/scale) */ scale(x: number, y: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setTransform) */ setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void; setTransform(transform?: DOMMatrix2DInit): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/transform) */ transform(a: number, b: number, c: number, d: number, e: number, f: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/translate) */ translate(x: number, y: number): void; } /** * 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(). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Client) */ interface Client { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Client/frameType) */ readonly frameType: FrameType; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Client/id) */ readonly id: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Client/type) */ readonly type: ClientTypes; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Client/url) */ readonly url: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Client/postMessage) */ postMessage(message: any, transfer: Transferable[]): void; postMessage(message: any, options?: StructuredSerializeOptions): void; } declare var Client: { prototype: Client; new(): Client; }; /** * Provides access to Client objects. Access it via self.clients within a service worker. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clients) */ interface Clients { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clients/claim) */ claim(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clients/get) */ get(id: string): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clients/matchAll) */ matchAll(options?: T): Promise>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clients/openWindow) */ openWindow(url: string | URL): Promise; } declare var Clients: { prototype: Clients; new(): Clients; }; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent) */ interface CloseEvent extends Event { /** * Returns the WebSocket connection close code provided by the server. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/code) */ readonly code: number; /** * Returns the WebSocket connection close reason provided by the server. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/reason) */ readonly reason: string; /** * Returns true if the connection closed cleanly; false otherwise. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean) */ readonly wasClean: boolean; } declare var CloseEvent: { prototype: CloseEvent; new(type: string, eventInitDict?: CloseEventInit): CloseEvent; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */ interface CompressionStream extends GenericTransformStream { } declare var CompressionStream: { prototype: CompressionStream; new(format: CompressionFormat): CompressionStream; }; /** * This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy) */ interface CountQueuingStrategy extends QueuingStrategy { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */ readonly highWaterMark: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */ readonly size: QueuingStrategySize; } declare var CountQueuingStrategy: { prototype: CountQueuingStrategy; new(init: QueuingStrategyInit): CountQueuingStrategy; }; /** * Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto) */ interface Crypto { /** * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle) */ readonly subtle: SubtleCrypto; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */ getRandomValues(array: T): T; /** * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID) */ randomUUID(): `${string}-${string}-${string}-${string}-${string}`; } declare var Crypto: { prototype: Crypto; new(): Crypto; }; /** * The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey) */ interface CryptoKey { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */ readonly algorithm: KeyAlgorithm; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */ readonly extractable: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */ readonly type: KeyType; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */ readonly usages: KeyUsage[]; } declare var CryptoKey: { prototype: CryptoKey; new(): CryptoKey; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */ interface CustomEvent extends Event { /** * Returns any custom data event was created with. Typically used for synthetic events. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail) */ readonly detail: T; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/initCustomEvent) */ initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void; } declare var CustomEvent: { prototype: CustomEvent; new(type: string, eventInitDict?: CustomEventInit): CustomEvent; }; /** * An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException) */ interface DOMException extends Error { /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code) */ readonly code: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) */ readonly message: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) */ readonly name: string; readonly INDEX_SIZE_ERR: 1; readonly DOMSTRING_SIZE_ERR: 2; readonly HIERARCHY_REQUEST_ERR: 3; readonly WRONG_DOCUMENT_ERR: 4; readonly INVALID_CHARACTER_ERR: 5; readonly NO_DATA_ALLOWED_ERR: 6; readonly NO_MODIFICATION_ALLOWED_ERR: 7; readonly NOT_FOUND_ERR: 8; readonly NOT_SUPPORTED_ERR: 9; readonly INUSE_ATTRIBUTE_ERR: 10; readonly INVALID_STATE_ERR: 11; readonly SYNTAX_ERR: 12; readonly INVALID_MODIFICATION_ERR: 13; readonly NAMESPACE_ERR: 14; readonly INVALID_ACCESS_ERR: 15; readonly VALIDATION_ERR: 16; readonly TYPE_MISMATCH_ERR: 17; readonly SECURITY_ERR: 18; readonly NETWORK_ERR: 19; readonly ABORT_ERR: 20; readonly URL_MISMATCH_ERR: 21; readonly QUOTA_EXCEEDED_ERR: 22; readonly TIMEOUT_ERR: 23; readonly INVALID_NODE_TYPE_ERR: 24; readonly DATA_CLONE_ERR: 25; } declare var DOMException: { prototype: DOMException; new(message?: string, name?: string): DOMException; readonly INDEX_SIZE_ERR: 1; readonly DOMSTRING_SIZE_ERR: 2; readonly HIERARCHY_REQUEST_ERR: 3; readonly WRONG_DOCUMENT_ERR: 4; readonly INVALID_CHARACTER_ERR: 5; readonly NO_DATA_ALLOWED_ERR: 6; readonly NO_MODIFICATION_ALLOWED_ERR: 7; readonly NOT_FOUND_ERR: 8; readonly NOT_SUPPORTED_ERR: 9; readonly INUSE_ATTRIBUTE_ERR: 10; readonly INVALID_STATE_ERR: 11; readonly SYNTAX_ERR: 12; readonly INVALID_MODIFICATION_ERR: 13; readonly NAMESPACE_ERR: 14; readonly INVALID_ACCESS_ERR: 15; readonly VALIDATION_ERR: 16; readonly TYPE_MISMATCH_ERR: 17; readonly SECURITY_ERR: 18; readonly NETWORK_ERR: 19; readonly ABORT_ERR: 20; readonly URL_MISMATCH_ERR: 21; readonly QUOTA_EXCEEDED_ERR: 22; readonly TIMEOUT_ERR: 23; readonly INVALID_NODE_TYPE_ERR: 24; readonly DATA_CLONE_ERR: 25; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix) */ interface DOMMatrix extends DOMMatrixReadOnly { a: number; b: number; c: number; d: number; e: number; f: number; m11: number; m12: number; m13: number; m14: number; m21: number; m22: number; m23: number; m24: number; m31: number; m32: number; m33: number; m34: number; m41: number; m42: number; m43: number; m44: number; invertSelf(): DOMMatrix; multiplySelf(other?: DOMMatrixInit): DOMMatrix; preMultiplySelf(other?: DOMMatrixInit): DOMMatrix; rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix; rotateFromVectorSelf(x?: number, y?: number): DOMMatrix; rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/scale3dSelf) */ scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/scaleSelf) */ scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; skewXSelf(sx?: number): DOMMatrix; skewYSelf(sy?: number): DOMMatrix; translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix; } declare var DOMMatrix: { prototype: DOMMatrix; new(init?: string | number[]): DOMMatrix; fromFloat32Array(array32: Float32Array): DOMMatrix; fromFloat64Array(array64: Float64Array): DOMMatrix; fromMatrix(other?: DOMMatrixInit): DOMMatrix; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly) */ interface DOMMatrixReadOnly { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/a) */ readonly a: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/b) */ readonly b: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/c) */ readonly c: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/d) */ readonly d: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/e) */ readonly e: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/f) */ readonly f: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/is2D) */ readonly is2D: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/isIdentity) */ readonly isIdentity: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m11) */ readonly m11: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m12) */ readonly m12: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m13) */ readonly m13: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m14) */ readonly m14: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m21) */ readonly m21: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m22) */ readonly m22: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m23) */ readonly m23: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m24) */ readonly m24: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m31) */ readonly m31: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m32) */ readonly m32: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m33) */ readonly m33: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m34) */ readonly m34: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m41) */ readonly m41: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m42) */ readonly m42: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m43) */ readonly m43: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m44) */ readonly m44: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipX) */ flipX(): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipY) */ flipY(): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/inverse) */ inverse(): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/multiply) */ multiply(other?: DOMMatrixInit): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/rotate) */ rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/rotateAxisAngle) */ rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/rotateFromVector) */ rotateFromVector(x?: number, y?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/scale) */ scale(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/scale3d) */ scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/scaleNonUniform) */ scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/skewX) */ skewX(sx?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/skewY) */ skewY(sy?: number): DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toFloat32Array) */ toFloat32Array(): Float32Array; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toFloat64Array) */ toFloat64Array(): Float64Array; toJSON(): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/transformPoint) */ transformPoint(point?: DOMPointInit): DOMPoint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/translate) */ translate(tx?: number, ty?: number, tz?: number): DOMMatrix; } declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; new(init?: string | number[]): DOMMatrixReadOnly; fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly; fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly; fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint) */ interface DOMPoint extends DOMPointReadOnly { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/w) */ w: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/x) */ x: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/y) */ y: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/z) */ z: number; } declare var DOMPoint: { prototype: DOMPoint; new(x?: number, y?: number, z?: number, w?: number): DOMPoint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint_static) */ fromPoint(other?: DOMPointInit): DOMPoint; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly) */ interface DOMPointReadOnly { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/w) */ readonly w: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/x) */ readonly x: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/y) */ readonly y: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/z) */ readonly z: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/matrixTransform) */ matrixTransform(matrix?: DOMMatrixInit): DOMPoint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/toJSON) */ toJSON(): any; } declare var DOMPointReadOnly: { prototype: DOMPointReadOnly; new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint_static) */ fromPoint(other?: DOMPointInit): DOMPointReadOnly; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad) */ interface DOMQuad { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p1) */ readonly p1: DOMPoint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p2) */ readonly p2: DOMPoint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p3) */ readonly p3: DOMPoint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p4) */ readonly p4: DOMPoint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/getBounds) */ getBounds(): DOMRect; toJSON(): any; } declare var DOMQuad: { prototype: DOMQuad; new(p1?: DOMPointInit, p2?: DOMPointInit, p3?: DOMPointInit, p4?: DOMPointInit): DOMQuad; fromQuad(other?: DOMQuadInit): DOMQuad; fromRect(other?: DOMRectInit): DOMQuad; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect) */ interface DOMRect extends DOMRectReadOnly { height: number; width: number; x: number; y: number; } declare var DOMRect: { prototype: DOMRect; new(x?: number, y?: number, width?: number, height?: number): DOMRect; fromRect(other?: DOMRectInit): DOMRect; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly) */ interface DOMRectReadOnly { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/bottom) */ readonly bottom: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/height) */ readonly height: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/left) */ readonly left: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/right) */ readonly right: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/top) */ readonly top: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/width) */ readonly width: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/x) */ readonly x: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/y) */ readonly y: number; toJSON(): any; } declare var DOMRectReadOnly: { prototype: DOMRectReadOnly; new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect_static) */ fromRect(other?: DOMRectInit): DOMRectReadOnly; }; /** * A type returned by some APIs which contains a list of DOMString (strings). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMStringList) */ interface DOMStringList { /** * Returns the number of strings in strings. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMStringList/length) */ readonly length: number; /** * Returns true if strings contains string, and false otherwise. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMStringList/contains) */ contains(string: string): boolean; /** * Returns the string with index index from strings. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMStringList/item) */ item(index: number): string | null; [index: number]: string; } declare var DOMStringList: { prototype: DOMStringList; new(): DOMStringList; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */ interface DecompressionStream extends GenericTransformStream { } declare var DecompressionStream: { prototype: DecompressionStream; new(format: CompressionFormat): DecompressionStream; }; interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap { "message": MessageEvent; "messageerror": MessageEvent; "rtctransform": Event; } /** * (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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope) */ interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFrameProvider { /** * Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/name) */ readonly name: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */ onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */ onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/rtctransform_event) */ onrtctransform: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; /** * Aborts dedicatedWorkerGlobal. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/close) */ close(): void; /** * Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/postMessage) */ postMessage(message: any, transfer: Transferable[]): void; postMessage(message: any, options?: StructuredSerializeOptions): void; addEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var DedicatedWorkerGlobalScope: { prototype: DedicatedWorkerGlobalScope; new(): DedicatedWorkerGlobalScope; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_blend_minmax) */ interface EXT_blend_minmax { readonly MIN_EXT: 0x8007; readonly MAX_EXT: 0x8008; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_color_buffer_float) */ interface EXT_color_buffer_float { } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_color_buffer_half_float) */ interface EXT_color_buffer_half_float { readonly RGBA16F_EXT: 0x881A; readonly RGB16F_EXT: 0x881B; readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: 0x8211; readonly UNSIGNED_NORMALIZED_EXT: 0x8C17; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_float_blend) */ interface EXT_float_blend { } /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_frag_depth) */ interface EXT_frag_depth { } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_sRGB) */ interface EXT_sRGB { readonly SRGB_EXT: 0x8C40; readonly SRGB_ALPHA_EXT: 0x8C42; readonly SRGB8_ALPHA8_EXT: 0x8C43; readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: 0x8210; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_shader_texture_lod) */ interface EXT_shader_texture_lod { } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_compression_bptc) */ interface EXT_texture_compression_bptc { readonly COMPRESSED_RGBA_BPTC_UNORM_EXT: 0x8E8C; readonly COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT: 0x8E8D; readonly COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT: 0x8E8E; readonly COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT: 0x8E8F; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_compression_rgtc) */ interface EXT_texture_compression_rgtc { readonly COMPRESSED_RED_RGTC1_EXT: 0x8DBB; readonly COMPRESSED_SIGNED_RED_RGTC1_EXT: 0x8DBC; readonly COMPRESSED_RED_GREEN_RGTC2_EXT: 0x8DBD; readonly COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT: 0x8DBE; } /** * The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_filter_anisotropic) */ interface EXT_texture_filter_anisotropic { readonly TEXTURE_MAX_ANISOTROPY_EXT: 0x84FE; readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: 0x84FF; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_norm16) */ interface EXT_texture_norm16 { readonly R16_EXT: 0x822A; readonly RG16_EXT: 0x822C; readonly RGB16_EXT: 0x8054; readonly RGBA16_EXT: 0x805B; readonly R16_SNORM_EXT: 0x8F98; readonly RG16_SNORM_EXT: 0x8F99; readonly RGB16_SNORM_EXT: 0x8F9A; readonly RGBA16_SNORM_EXT: 0x8F9B; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk) */ interface EncodedVideoChunk { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/byteLength) */ readonly byteLength: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/duration) */ readonly duration: number | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/timestamp) */ readonly timestamp: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/type) */ readonly type: EncodedVideoChunkType; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/copyTo) */ copyTo(destination: AllowSharedBufferSource): void; } declare var EncodedVideoChunk: { prototype: EncodedVideoChunk; new(init: EncodedVideoChunkInit): EncodedVideoChunk; }; /** * Events providing information related to errors in scripts or in files. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent) */ interface ErrorEvent extends Event { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */ readonly colno: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */ readonly error: any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */ readonly filename: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */ readonly lineno: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */ readonly message: string; } declare var ErrorEvent: { prototype: ErrorEvent; new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent; }; /** * An event which takes place in the DOM. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event) */ interface Event { /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles) */ readonly bubbles: boolean; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble) */ cancelBubble: boolean; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable) */ readonly cancelable: boolean; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed) */ readonly composed: boolean; /** * Returns the object whose event listener's callback is currently being invoked. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget) */ readonly currentTarget: EventTarget | null; /** * Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented) */ readonly defaultPrevented: boolean; /** * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase) */ readonly eventPhase: number; /** * Returns true if event was dispatched by the user agent, and false otherwise. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted) */ readonly isTrusted: boolean; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue) */ returnValue: boolean; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement) */ readonly srcElement: EventTarget | null; /** * Returns the object to which event is dispatched (its target). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target) */ readonly target: EventTarget | null; /** * Returns the event's timestamp as the number of milliseconds measured relative to the time origin. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp) */ readonly timeStamp: DOMHighResTimeStamp; /** * Returns the type of event, e.g. "click", "hashchange", or "submit". * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type) */ readonly type: string; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath) */ composedPath(): EventTarget[]; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent) */ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault) */ preventDefault(): void; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation) */ stopImmediatePropagation(): void; /** * When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation) */ stopPropagation(): void; readonly NONE: 0; readonly CAPTURING_PHASE: 1; readonly AT_TARGET: 2; readonly BUBBLING_PHASE: 3; } declare var Event: { prototype: Event; new(type: string, eventInitDict?: EventInit): Event; readonly NONE: 0; readonly CAPTURING_PHASE: 1; readonly AT_TARGET: 2; readonly BUBBLING_PHASE: 3; }; interface EventListener { (evt: Event): void; } interface EventListenerObject { handleEvent(object: Event): void; } interface EventSourceEventMap { "error": Event; "message": MessageEvent; "open": Event; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */ interface EventSource extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */ onerror: ((this: EventSource, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */ onmessage: ((this: EventSource, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */ onopen: ((this: EventSource, ev: Event) => any) | null; /** * Returns the state of this EventSource object's connection. It can have the values described below. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState) */ readonly readyState: number; /** * Returns the URL providing the event stream. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url) */ readonly url: string; /** * Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials) */ readonly withCredentials: boolean; /** * Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close) */ close(): void; readonly CONNECTING: 0; readonly OPEN: 1; readonly CLOSED: 2; addEventListener(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var EventSource: { prototype: EventSource; new(url: string | URL, eventSourceInitDict?: EventSourceInit): EventSource; readonly CONNECTING: 0; readonly OPEN: 1; readonly CLOSED: 2; }; /** * EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget) */ interface EventTarget { /** * 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. * * 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. * * 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. * * 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. * * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. * * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. * * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener) */ addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) */ dispatchEvent(event: Event): boolean; /** * Removes the event listener in target's event listener list with the same type, callback, and options. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener) */ removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void; } declare var EventTarget: { prototype: EventTarget; new(): EventTarget; }; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent) */ interface ExtendableEvent extends Event { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */ waitUntil(f: Promise): void; } declare var ExtendableEvent: { prototype: ExtendableEvent; new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent; }; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableMessageEvent) */ interface ExtendableMessageEvent extends ExtendableEvent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableMessageEvent/data) */ readonly data: any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableMessageEvent/lastEventId) */ readonly lastEventId: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableMessageEvent/origin) */ readonly origin: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableMessageEvent/ports) */ readonly ports: ReadonlyArray; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableMessageEvent/source) */ readonly source: Client | ServiceWorker | MessagePort | null; } declare var ExtendableMessageEvent: { prototype: ExtendableMessageEvent; new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent; }; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent) */ interface FetchEvent extends ExtendableEvent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/clientId) */ readonly clientId: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/handled) */ readonly handled: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/preloadResponse) */ readonly preloadResponse: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */ readonly request: Request; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/resultingClientId) */ readonly resultingClientId: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */ respondWith(r: Response | PromiseLike): void; } declare var FetchEvent: { prototype: FetchEvent; new(type: string, eventInitDict: FetchEventInit): FetchEvent; }; /** * Provides information about files and allows JavaScript in a web page to access their content. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/File) */ interface File extends Blob { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */ readonly lastModified: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */ readonly name: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/webkitRelativePath) */ readonly webkitRelativePath: string; } declare var File: { prototype: File; new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File; }; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileList) */ interface FileList { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileList/length) */ readonly length: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileList/item) */ item(index: number): File | null; [index: number]: File; } declare var FileList: { prototype: FileList; new(): FileList; }; interface FileReaderEventMap { "abort": ProgressEvent; "error": ProgressEvent; "load": ProgressEvent; "loadend": ProgressEvent; "loadstart": ProgressEvent; "progress": ProgressEvent; } /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader) */ interface FileReader extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/error) */ readonly error: DOMException | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/abort_event) */ onabort: ((this: FileReader, ev: ProgressEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/error_event) */ onerror: ((this: FileReader, ev: ProgressEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/load_event) */ onload: ((this: FileReader, ev: ProgressEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/loadend_event) */ onloadend: ((this: FileReader, ev: ProgressEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/loadstart_event) */ onloadstart: ((this: FileReader, ev: ProgressEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/progress_event) */ onprogress: ((this: FileReader, ev: ProgressEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState) */ readonly readyState: typeof FileReader.EMPTY | typeof FileReader.LOADING | typeof FileReader.DONE; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/result) */ readonly result: string | ArrayBuffer | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/abort) */ abort(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsArrayBuffer) */ readAsArrayBuffer(blob: Blob): void; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsBinaryString) */ readAsBinaryString(blob: Blob): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsDataURL) */ readAsDataURL(blob: Blob): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsText) */ readAsText(blob: Blob, encoding?: string): void; readonly EMPTY: 0; readonly LOADING: 1; readonly DONE: 2; addEventListener(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var FileReader: { prototype: FileReader; new(): FileReader; readonly EMPTY: 0; readonly LOADING: 1; readonly DONE: 2; }; /** * Allows to read File or Blob objects in a synchronous way. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReaderSync) */ interface FileReaderSync { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReaderSync/readAsArrayBuffer) */ readAsArrayBuffer(blob: Blob): ArrayBuffer; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReaderSync/readAsBinaryString) */ readAsBinaryString(blob: Blob): string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReaderSync/readAsDataURL) */ readAsDataURL(blob: Blob): string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReaderSync/readAsText) */ readAsText(blob: Blob, encoding?: string): string; } declare var FileReaderSync: { prototype: FileReaderSync; new(): FileReaderSync; }; /** * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle) */ interface FileSystemDirectoryHandle extends FileSystemHandle { readonly kind: "directory"; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/getDirectoryHandle) */ getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/getFileHandle) */ getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/removeEntry) */ removeEntry(name: string, options?: FileSystemRemoveOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/resolve) */ resolve(possibleDescendant: FileSystemHandle): Promise; } declare var FileSystemDirectoryHandle: { prototype: FileSystemDirectoryHandle; new(): FileSystemDirectoryHandle; }; /** * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle) */ interface FileSystemFileHandle extends FileSystemHandle { readonly kind: "file"; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle/createSyncAccessHandle) */ createSyncAccessHandle(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle/createWritable) */ createWritable(options?: FileSystemCreateWritableOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle/getFile) */ getFile(): Promise; } declare var FileSystemFileHandle: { prototype: FileSystemFileHandle; new(): FileSystemFileHandle; }; /** * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemHandle) */ interface FileSystemHandle { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/kind) */ readonly kind: FileSystemHandleKind; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/name) */ readonly name: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/isSameEntry) */ isSameEntry(other: FileSystemHandle): Promise; } declare var FileSystemHandle: { prototype: FileSystemHandle; new(): FileSystemHandle; }; /** * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle) */ interface FileSystemSyncAccessHandle { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/close) */ close(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/flush) */ flush(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/getSize) */ getSize(): number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/read) */ read(buffer: AllowSharedBufferSource, options?: FileSystemReadWriteOptions): number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/truncate) */ truncate(newSize: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/write) */ write(buffer: AllowSharedBufferSource, options?: FileSystemReadWriteOptions): number; } declare var FileSystemSyncAccessHandle: { prototype: FileSystemSyncAccessHandle; new(): FileSystemSyncAccessHandle; }; /** * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream) */ interface FileSystemWritableFileStream extends WritableStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/seek) */ seek(position: number): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/truncate) */ truncate(size: number): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write) */ write(data: FileSystemWriteChunkType): Promise; } declare var FileSystemWritableFileStream: { prototype: FileSystemWritableFileStream; new(): FileSystemWritableFileStream; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace) */ interface FontFace { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/ascentOverride) */ ascentOverride: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/descentOverride) */ descentOverride: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/display) */ display: FontDisplay; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/family) */ family: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/featureSettings) */ featureSettings: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/lineGapOverride) */ lineGapOverride: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/loaded) */ readonly loaded: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/status) */ readonly status: FontFaceLoadStatus; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/stretch) */ stretch: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/style) */ style: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/unicodeRange) */ unicodeRange: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/weight) */ weight: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/load) */ load(): Promise; } declare var FontFace: { prototype: FontFace; new(family: string, source: string | BinaryData, descriptors?: FontFaceDescriptors): FontFace; }; interface FontFaceSetEventMap { "loading": Event; "loadingdone": Event; "loadingerror": Event; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */ interface FontFaceSet extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */ onloading: ((this: FontFaceSet, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */ onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingerror_event) */ onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready) */ readonly ready: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/status) */ readonly status: FontFaceSetLoadStatus; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check) */ check(font: string, text?: string): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load) */ load(font: string, text?: string): Promise; forEach(callbackfn: (value: FontFace, key: FontFace, parent: FontFaceSet) => void, thisArg?: any): void; addEventListener(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var FontFaceSet: { prototype: FontFaceSet; new(initialFaces: FontFace[]): FontFaceSet; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */ interface FontFaceSetLoadEvent extends Event { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent/fontfaces) */ readonly fontfaces: ReadonlyArray; } declare var FontFaceSetLoadEvent: { prototype: FontFaceSetLoadEvent; new(type: string, eventInitDict?: FontFaceSetLoadEventInit): FontFaceSetLoadEvent; }; interface FontFaceSource { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/fonts) */ readonly fonts: FontFaceSet; } /** * 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". * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData) */ interface FormData { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */ append(name: string, value: string | Blob): void; append(name: string, value: string): void; append(name: string, blobValue: Blob, filename?: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */ delete(name: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */ get(name: string): FormDataEntryValue | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */ getAll(name: string): FormDataEntryValue[]; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */ has(name: string): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */ set(name: string, value: string | Blob): void; set(name: string, value: string): void; set(name: string, blobValue: Blob, filename?: string): void; forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void; } declare var FormData: { prototype: FormData; new(): FormData; }; interface GenericTransformStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/readable) */ readonly readable: ReadableStream; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/writable) */ readonly writable: WritableStream; } /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers) */ interface Headers { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */ append(name: string, value: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */ delete(name: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */ get(name: string): string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */ getSetCookie(): string[]; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */ has(name: string): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */ set(name: string, value: string): void; forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void; } declare var Headers: { prototype: Headers; new(init?: HeadersInit): Headers; }; /** * This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursor) */ interface IDBCursor { /** * Returns the direction ("next", "nextunique", "prev" or "prevunique") of the cursor. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursor/direction) */ readonly direction: IDBCursorDirection; /** * Returns the key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursor/key) */ readonly key: IDBValidKey; /** * Returns the effective key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursor/primaryKey) */ readonly primaryKey: IDBValidKey; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursor/request) */ readonly request: IDBRequest; /** * Returns the IDBObjectStore or IDBIndex the cursor was opened from. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursor/source) */ readonly source: IDBObjectStore | IDBIndex; /** * Advances the cursor through the next count records in range. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursor/advance) */ advance(count: number): void; /** * Advances the cursor to the next record in range. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursor/continue) */ continue(key?: IDBValidKey): void; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursor/continuePrimaryKey) */ continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void; /** * Delete the record pointed at by the cursor with a new value. * * If successful, request's result will be undefined. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursor/delete) */ delete(): IDBRequest; /** * Updated the record pointed at by the cursor with a new value. * * Throws a "DataError" DOMException if the effective object store uses in-line keys and the key would have changed. * * If successful, request's result will be the record's key. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursor/update) */ update(value: any): IDBRequest; } declare var IDBCursor: { prototype: IDBCursor; new(): IDBCursor; }; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursorWithValue) */ interface IDBCursorWithValue extends IDBCursor { /** * Returns the cursor's current value. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursorWithValue/value) */ readonly value: any; } declare var IDBCursorWithValue: { prototype: IDBCursorWithValue; new(): IDBCursorWithValue; }; interface IDBDatabaseEventMap { "abort": Event; "close": Event; "error": Event; "versionchange": IDBVersionChangeEvent; } /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase) */ interface IDBDatabase extends EventTarget { /** * Returns the name of the database. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/name) */ readonly name: string; /** * Returns a list of the names of object stores in the database. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames) */ readonly objectStoreNames: DOMStringList; onabort: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */ onclose: ((this: IDBDatabase, ev: Event) => any) | null; onerror: ((this: IDBDatabase, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/versionchange_event) */ onversionchange: ((this: IDBDatabase, ev: IDBVersionChangeEvent) => any) | null; /** * Returns the version of the database. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/version) */ readonly version: number; /** * Closes the connection once all running transactions have finished. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close) */ close(): void; /** * Creates a new object store with the given name and options and returns a new IDBObjectStore. * * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/createObjectStore) */ createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore; /** * Deletes the object store with the given name. * * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/deleteObjectStore) */ deleteObjectStore(name: string): void; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction) */ transaction(storeNames: string | string[], mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction; addEventListener(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var IDBDatabase: { prototype: IDBDatabase; new(): IDBDatabase; }; /** * 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.) * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBFactory) */ interface IDBFactory { /** * Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 precedes key1, and 0 if the keys are equal. * * Throws a "DataError" DOMException if either input is not a valid key. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBFactory/cmp) */ cmp(first: any, second: any): number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBFactory/databases) */ databases(): Promise; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBFactory/deleteDatabase) */ deleteDatabase(name: string): IDBOpenDBRequest; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBFactory/open) */ open(name: string, version?: number): IDBOpenDBRequest; } declare var IDBFactory: { prototype: IDBFactory; new(): IDBFactory; }; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex) */ interface IDBIndex { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/keyPath) */ readonly keyPath: string | string[]; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/multiEntry) */ readonly multiEntry: boolean; /** * Returns the name of the index. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/name) */ name: string; /** * Returns the IDBObjectStore the index belongs to. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/objectStore) */ readonly objectStore: IDBObjectStore; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/unique) */ readonly unique: boolean; /** * Retrieves the number of records matching the given key or key range in query. * * If successful, request's result will be the count. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/count) */ count(query?: IDBValidKey | IDBKeyRange): IDBRequest; /** * Retrieves the value of the first record matching the given key or key range in query. * * If successful, request's result will be the value, or undefined if there was no matching record. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/get) */ get(query: IDBValidKey | IDBKeyRange): IDBRequest; /** * Retrieves the values of the records matching the given key or key range in query (up to count if given). * * If successful, request's result will be an Array of the values. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAll) */ getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; /** * Retrieves the keys of records matching the given key or key range in query (up to count if given). * * If successful, request's result will be an Array of the keys. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys) */ getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; /** * Retrieves the key of the first record matching the given key or key range in query. * * If successful, request's result will be the key, or undefined if there was no matching record. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/getKey) */ getKey(query: IDBValidKey | IDBKeyRange): IDBRequest; /** * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in index are matched. * * If successful, request's result will be an IDBCursorWithValue, or null if there were no matching records. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/openCursor) */ openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest; /** * 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. * * If successful, request's result will be an IDBCursor, or null if there were no matching records. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/openKeyCursor) */ openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest; } declare var IDBIndex: { prototype: IDBIndex; new(): IDBIndex; }; /** * 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: * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange) */ interface IDBKeyRange { /** * Returns lower bound, or undefined if none. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lower) */ readonly lower: any; /** * Returns true if the lower open flag is set, and false otherwise. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerOpen) */ readonly lowerOpen: boolean; /** * Returns upper bound, or undefined if none. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upper) */ readonly upper: any; /** * Returns true if the upper open flag is set, and false otherwise. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperOpen) */ readonly upperOpen: boolean; /** * Returns true if key is included in the range, and false otherwise. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/includes) */ includes(key: any): boolean; } declare var IDBKeyRange: { prototype: IDBKeyRange; new(): IDBKeyRange; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound_static) */ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange; /** * Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound_static) */ lowerBound(lower: any, open?: boolean): IDBKeyRange; /** * Returns a new IDBKeyRange spanning only key. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only_static) */ only(value: any): IDBKeyRange; /** * Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound_static) */ upperBound(upper: any, open?: boolean): IDBKeyRange; }; /** * 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.) * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore) */ interface IDBObjectStore { /** * Returns true if the store has a key generator, and false otherwise. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/autoIncrement) */ readonly autoIncrement: boolean; /** * Returns a list of the names of indexes in the store. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/indexNames) */ readonly indexNames: DOMStringList; /** * Returns the key path of the store, or null if none. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/keyPath) */ readonly keyPath: string | string[]; /** * Returns the name of the store. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/name) */ name: string; /** * Returns the associated transaction. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/transaction) */ readonly transaction: IDBTransaction; /** * Adds or updates a record in store with the given value and key. * * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown. * * 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. * * If successful, request's result will be the record's key. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/add) */ add(value: any, key?: IDBValidKey): IDBRequest; /** * Deletes all records in store. * * If successful, request's result will be undefined. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/clear) */ clear(): IDBRequest; /** * Retrieves the number of records matching the given key or key range in query. * * If successful, request's result will be the count. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/count) */ count(query?: IDBValidKey | IDBKeyRange): IDBRequest; /** * 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. * * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex) */ createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex; /** * Deletes records in store with the given key or in the given key range in query. * * If successful, request's result will be undefined. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/delete) */ delete(query: IDBValidKey | IDBKeyRange): IDBRequest; /** * Deletes the index in store with the given name. * * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/deleteIndex) */ deleteIndex(name: string): void; /** * Retrieves the value of the first record matching the given key or key range in query. * * If successful, request's result will be the value, or undefined if there was no matching record. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/get) */ get(query: IDBValidKey | IDBKeyRange): IDBRequest; /** * Retrieves the values of the records matching the given key or key range in query (up to count if given). * * If successful, request's result will be an Array of the values. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAll) */ getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; /** * Retrieves the keys of records matching the given key or key range in query (up to count if given). * * If successful, request's result will be an Array of the keys. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys) */ getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest; /** * Retrieves the key of the first record matching the given key or key range in query. * * If successful, request's result will be the key, or undefined if there was no matching record. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/getKey) */ getKey(query: IDBValidKey | IDBKeyRange): IDBRequest; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/index) */ index(name: string): IDBIndex; /** * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched. * * If successful, request's result will be an IDBCursorWithValue pointing at the first matching record, or null if there were no matching records. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/openCursor) */ openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest; /** * 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. * * If successful, request's result will be an IDBCursor pointing at the first matching record, or null if there were no matching records. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/openKeyCursor) */ openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest; /** * Adds or updates a record in store with the given value and key. * * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown. * * 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. * * If successful, request's result will be the record's key. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/put) */ put(value: any, key?: IDBValidKey): IDBRequest; } declare var IDBObjectStore: { prototype: IDBObjectStore; new(): IDBObjectStore; }; interface IDBOpenDBRequestEventMap extends IDBRequestEventMap { "blocked": IDBVersionChangeEvent; "upgradeneeded": IDBVersionChangeEvent; } /** * Also inherits methods from its parents IDBRequest and EventTarget. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBOpenDBRequest) */ interface IDBOpenDBRequest extends IDBRequest { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBOpenDBRequest/blocked_event) */ onblocked: ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBOpenDBRequest/upgradeneeded_event) */ onupgradeneeded: ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any) | null; addEventListener(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var IDBOpenDBRequest: { prototype: IDBOpenDBRequest; new(): IDBOpenDBRequest; }; interface IDBRequestEventMap { "error": Event; "success": Event; } /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBRequest) */ interface IDBRequest extends EventTarget { /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBRequest/error) */ readonly error: DOMException | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBRequest/error_event) */ onerror: ((this: IDBRequest, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBRequest/success_event) */ onsuccess: ((this: IDBRequest, ev: Event) => any) | null; /** * Returns "pending" until a request is complete, then returns "done". * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBRequest/readyState) */ readonly readyState: IDBRequestReadyState; /** * When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBRequest/result) */ readonly result: T; /** * Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBRequest/source) */ readonly source: IDBObjectStore | IDBIndex | IDBCursor; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBRequest/transaction) */ readonly transaction: IDBTransaction | null; addEventListener(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var IDBRequest: { prototype: IDBRequest; new(): IDBRequest; }; interface IDBTransactionEventMap { "abort": Event; "complete": Event; "error": Event; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction) */ interface IDBTransaction extends EventTarget { /** * Returns the transaction's connection. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/db) */ readonly db: IDBDatabase; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/durability) */ readonly durability: IDBTransactionDurability; /** * If the transaction was aborted, returns the error (a DOMException) providing the reason. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/error) */ readonly error: DOMException | null; /** * Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/mode) */ readonly mode: IDBTransactionMode; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/objectStoreNames) */ readonly objectStoreNames: DOMStringList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ onabort: ((this: IDBTransaction, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/complete_event) */ oncomplete: ((this: IDBTransaction, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/error_event) */ onerror: ((this: IDBTransaction, ev: Event) => any) | null; /** * Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort) */ abort(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/commit) */ commit(): void; /** * Returns an IDBObjectStore in the transaction's scope. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/objectStore) */ objectStore(name: string): IDBObjectStore; addEventListener(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var IDBTransaction: { prototype: IDBTransaction; new(): IDBTransaction; }; /** * This IndexedDB API interface indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBVersionChangeEvent) */ interface IDBVersionChangeEvent extends Event { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBVersionChangeEvent/newVersion) */ readonly newVersion: number | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBVersionChangeEvent/oldVersion) */ readonly oldVersion: number; } declare var IDBVersionChangeEvent: { prototype: IDBVersionChangeEvent; new(type: string, eventInitDict?: IDBVersionChangeEventInit): IDBVersionChangeEvent; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmap) */ interface ImageBitmap { /** * Returns the intrinsic height of the image, in CSS pixels. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmap/height) */ readonly height: number; /** * Returns the intrinsic width of the image, in CSS pixels. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmap/width) */ readonly width: number; /** * Releases imageBitmap's underlying bitmap data. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmap/close) */ close(): void; } declare var ImageBitmap: { prototype: ImageBitmap; new(): ImageBitmap; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmapRenderingContext) */ interface ImageBitmapRenderingContext { /** * Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmapRenderingContext/transferFromImageBitmap) */ transferFromImageBitmap(bitmap: ImageBitmap | null): void; } declare var ImageBitmapRenderingContext: { prototype: ImageBitmapRenderingContext; new(): ImageBitmapRenderingContext; }; /** * 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(). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageData) */ interface ImageData { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageData/colorSpace) */ readonly colorSpace: PredefinedColorSpace; /** * Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageData/data) */ readonly data: Uint8ClampedArray; /** * Returns the actual dimensions of the data in the ImageData object, in pixels. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageData/height) */ readonly height: number; /** * Returns the actual dimensions of the data in the ImageData object, in pixels. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageData/width) */ readonly width: number; } declare var ImageData: { prototype: ImageData; new(sw: number, sh: number, settings?: ImageDataSettings): ImageData; new(data: Uint8ClampedArray, sw: number, sh?: number, settings?: ImageDataSettings): ImageData; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/KHR_parallel_shader_compile) */ interface KHR_parallel_shader_compile { readonly COMPLETION_STATUS_KHR: 0x91B1; } /** * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Lock) */ interface Lock { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Lock/mode) */ readonly mode: LockMode; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Lock/name) */ readonly name: string; } declare var Lock: { prototype: Lock; new(): Lock; }; /** * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/LockManager) */ interface LockManager { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/LockManager/query) */ query(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/LockManager/request) */ request(name: string, callback: LockGrantedCallback): Promise; request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise; } declare var LockManager: { prototype: LockManager; new(): LockManager; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaCapabilities) */ interface MediaCapabilities { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/decodingInfo) */ decodingInfo(configuration: MediaDecodingConfiguration): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/encodingInfo) */ encodingInfo(configuration: MediaEncodingConfiguration): Promise; } declare var MediaCapabilities: { prototype: MediaCapabilities; new(): MediaCapabilities; }; /** * This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel) */ interface MessageChannel { /** * Returns the first MessagePort object. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port1) */ readonly port1: MessagePort; /** * Returns the second MessagePort object. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port2) */ readonly port2: MessagePort; } declare var MessageChannel: { prototype: MessageChannel; new(): MessageChannel; }; /** * A message received by a target object. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent) */ interface MessageEvent extends Event { /** * Returns the data of the message. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data) */ readonly data: T; /** * Returns the last event ID string, for server-sent events. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId) */ readonly lastEventId: string; /** * Returns the origin of the message, for server-sent events and cross-document messaging. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin) */ readonly origin: string; /** * Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports) */ readonly ports: ReadonlyArray; /** * Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/source) */ readonly source: MessageEventSource | null; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/initMessageEvent) */ initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void; } declare var MessageEvent: { prototype: MessageEvent; new(type: string, eventInitDict?: MessageEventInit): MessageEvent; }; interface MessagePortEventMap { "message": MessageEvent; "messageerror": MessageEvent; } /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort) */ interface MessagePort extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/message_event) */ onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/messageerror_event) */ onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null; /** * Disconnects the port, so that it is no longer active. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close) */ close(): void; /** * 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. * * Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage) */ postMessage(message: any, transfer: Transferable[]): void; postMessage(message: any, options?: StructuredSerializeOptions): void; /** * Begins dispatching messages received on the port. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start) */ start(): void; addEventListener(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var MessagePort: { prototype: MessagePort; new(): MessagePort; }; /** * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager) */ interface NavigationPreloadManager { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/disable) */ disable(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/enable) */ enable(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/getState) */ getState(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/setHeaderValue) */ setHeaderValue(value: string): Promise; } declare var NavigationPreloadManager: { prototype: NavigationPreloadManager; new(): NavigationPreloadManager; }; /** Available only in secure contexts. */ interface NavigatorBadge { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/clearAppBadge) */ clearAppBadge(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/setAppBadge) */ setAppBadge(contents?: number): Promise; } interface NavigatorConcurrentHardware { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/hardwareConcurrency) */ readonly hardwareConcurrency: number; } interface NavigatorID { /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appCodeName) */ readonly appCodeName: string; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appName) */ readonly appName: string; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/appVersion) */ readonly appVersion: string; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/platform) */ readonly platform: string; /** * @deprecated * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/product) */ readonly product: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/userAgent) */ readonly userAgent: string; } interface NavigatorLanguage { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/language) */ readonly language: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/languages) */ readonly languages: ReadonlyArray; } /** Available only in secure contexts. */ interface NavigatorLocks { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/locks) */ readonly locks: LockManager; } interface NavigatorOnLine { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/onLine) */ readonly onLine: boolean; } /** Available only in secure contexts. */ interface NavigatorStorage { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/storage) */ readonly storage: StorageManager; } interface NotificationEventMap { "click": Event; "close": Event; "error": Event; "show": Event; } /** * This Notifications API interface is used to configure and display desktop notifications to the user. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification) */ interface Notification extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/badge) */ readonly badge: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/body) */ readonly body: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/data) */ readonly data: any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/dir) */ readonly dir: NotificationDirection; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/icon) */ readonly icon: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/lang) */ readonly lang: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/click_event) */ onclick: ((this: Notification, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/close_event) */ onclose: ((this: Notification, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/error_event) */ onerror: ((this: Notification, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/show_event) */ onshow: ((this: Notification, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/requireInteraction) */ readonly requireInteraction: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/silent) */ readonly silent: boolean | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/tag) */ readonly tag: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/title) */ readonly title: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/close) */ close(): void; addEventListener(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var Notification: { prototype: Notification; new(title: string, options?: NotificationOptions): Notification; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission_static) */ readonly permission: NotificationPermission; }; /** * The parameter passed into the onnotificationclick handler, the NotificationEvent interface represents a notification click event that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/NotificationEvent) */ interface NotificationEvent extends ExtendableEvent { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NotificationEvent/action) */ readonly action: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NotificationEvent/notification) */ readonly notification: Notification; } declare var NotificationEvent: { prototype: NotificationEvent; new(type: string, eventInitDict: NotificationEventInit): NotificationEvent; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed) */ interface OES_draw_buffers_indexed { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/blendEquationSeparateiOES) */ blendEquationSeparateiOES(buf: GLuint, modeRGB: GLenum, modeAlpha: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/blendEquationiOES) */ blendEquationiOES(buf: GLuint, mode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/blendFuncSeparateiOES) */ blendFuncSeparateiOES(buf: GLuint, srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/blendFunciOES) */ blendFunciOES(buf: GLuint, src: GLenum, dst: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/colorMaskiOES) */ colorMaskiOES(buf: GLuint, r: GLboolean, g: GLboolean, b: GLboolean, a: GLboolean): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/disableiOES) */ disableiOES(target: GLenum, index: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/enableiOES) */ enableiOES(target: GLenum, index: GLuint): void; } /** * The OES_element_index_uint extension is part of the WebGL API and adds support for gl.UNSIGNED_INT types to WebGLRenderingContext.drawElements(). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_element_index_uint) */ interface OES_element_index_uint { } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_fbo_render_mipmap) */ interface OES_fbo_render_mipmap { } /** * The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_standard_derivatives) */ interface OES_standard_derivatives { readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: 0x8B8B; } /** * The OES_texture_float extension is part of the WebGL API and exposes floating-point pixel types for textures. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_texture_float) */ interface OES_texture_float { } /** * The OES_texture_float_linear extension is part of the WebGL API and allows linear filtering with floating-point pixel types for textures. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_texture_float_linear) */ interface OES_texture_float_linear { } /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_texture_half_float) */ interface OES_texture_half_float { readonly HALF_FLOAT_OES: 0x8D61; } /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_texture_half_float_linear) */ interface OES_texture_half_float_linear { } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object) */ interface OES_vertex_array_object { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/bindVertexArrayOES) */ bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/createVertexArrayOES) */ createVertexArrayOES(): WebGLVertexArrayObjectOES | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/deleteVertexArrayOES) */ deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/isVertexArrayOES) */ isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): GLboolean; readonly VERTEX_ARRAY_BINDING_OES: 0x85B5; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OVR_multiview2) */ interface OVR_multiview2 { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OVR_multiview2/framebufferTextureMultiviewOVR) */ framebufferTextureMultiviewOVR(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, baseViewIndex: GLint, numViews: GLsizei): void; readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: 0x9630; readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: 0x9632; readonly MAX_VIEWS_OVR: 0x9631; readonly FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: 0x9633; } interface OffscreenCanvasEventMap { "contextlost": Event; "contextrestored": Event; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas) */ interface OffscreenCanvas extends EventTarget { /** * These attributes return the dimensions of the OffscreenCanvas object's bitmap. * * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/height) */ height: number; oncontextlost: ((this: OffscreenCanvas, ev: Event) => any) | null; oncontextrestored: ((this: OffscreenCanvas, ev: Event) => any) | null; /** * These attributes return the dimensions of the OffscreenCanvas object's bitmap. * * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/width) */ width: number; /** * Returns a promise that will fulfill with a new Blob object representing a file containing the image in the OffscreenCanvas object. * * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/convertToBlob) */ convertToBlob(options?: ImageEncodeOptions): Promise; /** * 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. * * 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] * * 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). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/getContext) */ getContext(contextId: "2d", options?: any): OffscreenCanvasRenderingContext2D | null; getContext(contextId: "bitmaprenderer", options?: any): ImageBitmapRenderingContext | null; getContext(contextId: "webgl", options?: any): WebGLRenderingContext | null; getContext(contextId: "webgl2", options?: any): WebGL2RenderingContext | null; getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | null; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/transferToImageBitmap) */ transferToImageBitmap(): ImageBitmap; addEventListener(type: K, listener: (this: OffscreenCanvas, ev: OffscreenCanvasEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: OffscreenCanvas, ev: OffscreenCanvasEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var OffscreenCanvas: { prototype: OffscreenCanvas; new(width: number, height: number): OffscreenCanvas; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvasRenderingContext2D) */ interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform { readonly canvas: OffscreenCanvas; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvasRenderingContext2D/commit) */ commit(): void; } declare var OffscreenCanvasRenderingContext2D: { prototype: OffscreenCanvasRenderingContext2D; new(): OffscreenCanvasRenderingContext2D; }; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Path2D) */ interface Path2D extends CanvasPath { /** * Adds to the path the path given by the argument. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Path2D/addPath) */ addPath(path: Path2D, transform?: DOMMatrix2DInit): void; } declare var Path2D: { prototype: Path2D; new(path?: Path2D | string): Path2D; }; interface PerformanceEventMap { "resourcetimingbufferfull": Event; } /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance) */ interface Performance extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/resourcetimingbufferfull_event) */ onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/timeOrigin) */ readonly timeOrigin: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */ clearMarks(markName?: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */ clearMeasures(measureName?: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */ clearResourceTimings(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */ getEntries(): PerformanceEntryList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */ getEntriesByName(name: string, type?: string): PerformanceEntryList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */ getEntriesByType(type: string): PerformanceEntryList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */ mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */ measure(measureName: string, startOrMeasureOptions?: string | PerformanceMeasureOptions, endMark?: string): PerformanceMeasure; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/now) */ now(): DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */ setResourceTimingBufferSize(maxSize: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON) */ toJSON(): any; addEventListener(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var Performance: { prototype: Performance; new(): Performance; }; /** * 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). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry) */ interface PerformanceEntry { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */ readonly duration: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */ readonly entryType: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */ readonly name: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */ readonly startTime: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */ toJSON(): any; } declare var PerformanceEntry: { prototype: PerformanceEntry; new(): PerformanceEntry; }; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark) */ interface PerformanceMark extends PerformanceEntry { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */ readonly detail: any; } declare var PerformanceMark: { prototype: PerformanceMark; new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; }; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure) */ interface PerformanceMeasure extends PerformanceEntry { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */ readonly detail: any; } declare var PerformanceMeasure: { prototype: PerformanceMeasure; new(): PerformanceMeasure; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver) */ interface PerformanceObserver { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/disconnect) */ disconnect(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/observe) */ observe(options?: PerformanceObserverInit): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/takeRecords) */ takeRecords(): PerformanceEntryList; } declare var PerformanceObserver: { prototype: PerformanceObserver; new(callback: PerformanceObserverCallback): PerformanceObserver; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes_static) */ readonly supportedEntryTypes: ReadonlyArray; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList) */ interface PerformanceObserverEntryList { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntries) */ getEntries(): PerformanceEntryList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByName) */ getEntriesByName(name: string, type?: string): PerformanceEntryList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByType) */ getEntriesByType(type: string): PerformanceEntryList; } declare var PerformanceObserverEntryList: { prototype: PerformanceObserverEntryList; new(): PerformanceObserverEntryList; }; /** * 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. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming) */ interface PerformanceResourceTiming extends PerformanceEntry { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectEnd) */ readonly connectEnd: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectStart) */ readonly connectStart: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize) */ readonly decodedBodySize: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupEnd) */ readonly domainLookupEnd: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupStart) */ readonly domainLookupStart: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/encodedBodySize) */ readonly encodedBodySize: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart) */ readonly fetchStart: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/initiatorType) */ readonly initiatorType: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol) */ readonly nextHopProtocol: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectEnd) */ readonly redirectEnd: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectStart) */ readonly redirectStart: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/requestStart) */ readonly requestStart: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseEnd) */ readonly responseEnd: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart) */ readonly responseStart: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/secureConnectionStart) */ readonly secureConnectionStart: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/serverTiming) */ readonly serverTiming: ReadonlyArray; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */ readonly transferSize: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/workerStart) */ readonly workerStart: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/toJSON) */ toJSON(): any; } declare var PerformanceResourceTiming: { prototype: PerformanceResourceTiming; new(): PerformanceResourceTiming; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceServerTiming) */ interface PerformanceServerTiming { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceServerTiming/description) */ readonly description: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceServerTiming/duration) */ readonly duration: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceServerTiming/name) */ readonly name: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceServerTiming/toJSON) */ toJSON(): any; } declare var PerformanceServerTiming: { prototype: PerformanceServerTiming; new(): PerformanceServerTiming; }; interface PermissionStatusEventMap { "change": Event; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PermissionStatus) */ interface PermissionStatus extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PermissionStatus/name) */ readonly name: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PermissionStatus/change_event) */ onchange: ((this: PermissionStatus, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PermissionStatus/state) */ readonly state: PermissionState; addEventListener(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare var PermissionStatus: { prototype: PermissionStatus; new(): PermissionStatus; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Permissions) */ interface Permissions { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Permissions/query) */ query(permissionDesc: PermissionDescriptor): Promise; } declare var Permissions: { prototype: Permissions; new(): Permissions; }; /** * Events measuring progress of an underlying process, like an HTTP request (for an XMLHttpRequest, or the loading of the underlying resource of an ,