summaryrefslogtreecommitdiff
path: root/cli/dts/lib.webworker.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/dts/lib.webworker.d.ts')
-rw-r--r--cli/dts/lib.webworker.d.ts135
1 files changed, 110 insertions, 25 deletions
diff --git a/cli/dts/lib.webworker.d.ts b/cli/dts/lib.webworker.d.ts
index f6b3d43b3..6f9a2eaf5 100644
--- a/cli/dts/lib.webworker.d.ts
+++ b/cli/dts/lib.webworker.d.ts
@@ -379,6 +379,11 @@ interface MultiCacheQueryOptions extends CacheQueryOptions {
cacheName?: string;
}
+interface NavigationPreloadState {
+ enabled?: boolean;
+ headerValue?: string;
+}
+
interface NotificationAction {
action: string;
icon?: string;
@@ -475,6 +480,22 @@ interface QueuingStrategyInit {
highWaterMark: number;
}
+interface RTCEncodedAudioFrameMetadata {
+ contributingSources?: number[];
+ synchronizationSource?: number;
+}
+
+interface RTCEncodedVideoFrameMetadata {
+ contributingSources?: number[];
+ dependencies?: number[];
+ frameId?: number;
+ height?: number;
+ spatialIndex?: number;
+ synchronizationSource?: number;
+ temporalIndex?: number;
+ width?: number;
+}
+
interface ReadableStreamDefaultReadDoneResult {
done: true;
value?: undefined;
@@ -648,6 +669,13 @@ interface UnderlyingSource<R = any> {
type?: undefined;
}
+interface VideoColorSpaceInit {
+ fullRange?: boolean;
+ matrix?: VideoMatrixCoefficients;
+ primaries?: VideoColorPrimaries;
+ transfer?: VideoTransferCharacteristics;
+}
+
interface VideoConfiguration {
bitrate: number;
colorGamut?: ColorGamut;
@@ -695,7 +723,7 @@ interface AbortController {
/** Returns the AbortSignal object associated with this object. */
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. */
- abort(reason?: any): void;
+ // abort(): AbortSignal; - To be re-added in the future
}
declare var AbortController: {
@@ -712,6 +740,8 @@ interface AbortSignal extends EventTarget {
/** Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. */
readonly aborted: boolean;
onabort: ((this: AbortSignal, ev: Event) => any) | null;
+ readonly reason: any;
+ throwIfAborted(): void;
addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -721,7 +751,7 @@ interface AbortSignal extends EventTarget {
declare var AbortSignal: {
prototype: AbortSignal;
new(): AbortSignal;
- // abort(): AbortSignal; - To be re-added in the future
+ abort(reason?: any): AbortSignal;
};
interface AbstractWorkerEventMap {
@@ -747,7 +777,7 @@ interface Blob {
readonly type: string;
arrayBuffer(): Promise<ArrayBuffer>;
slice(start?: number, end?: number, contentType?: string): Blob;
- stream(): ReadableStream;
+ stream(): ReadableStream<Uint8Array>;
text(): Promise<string>;
}
@@ -807,13 +837,13 @@ declare var ByteLengthQueuingStrategy: {
* Available only in secure contexts.
*/
interface Cache {
- add(request: RequestInfo): Promise<void>;
+ add(request: RequestInfo | URL): Promise<void>;
addAll(requests: RequestInfo[]): Promise<void>;
- delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
- keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
- match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>;
- matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
- put(request: RequestInfo, response: Response): Promise<void>;
+ delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<boolean>;
+ keys(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
+ match(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<Response | undefined>;
+ matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
+ put(request: RequestInfo | URL, response: Response): Promise<void>;
}
declare var Cache: {
@@ -829,7 +859,7 @@ interface CacheStorage {
delete(cacheName: string): Promise<boolean>;
has(cacheName: string): Promise<boolean>;
keys(): Promise<string[]>;
- match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
+ match(request: RequestInfo | URL, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
open(cacheName: string): Promise<Cache>;
}
@@ -1462,6 +1492,7 @@ declare var ExtendableMessageEvent: {
interface FetchEvent extends ExtendableEvent {
readonly clientId: string;
readonly handled: Promise<undefined>;
+ readonly preloadResponse: Promise<any>;
readonly request: Request;
readonly resultingClientId: string;
respondWith(r: Response | PromiseLike<Response>): void;
@@ -2115,6 +2146,7 @@ declare var ImageBitmapRenderingContext: {
/** The underlying pixel data of an area of a <canvas> 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(). */
interface ImageData {
+ readonly colorSpace: PredefinedColorSpace;
/** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
readonly data: Uint8ClampedArray;
/** Returns the actual dimensions of the data in the ImageData object, in pixels. */
@@ -2231,6 +2263,19 @@ declare var MessagePort: {
new(): MessagePort;
};
+/** Available only in secure contexts. */
+interface NavigationPreloadManager {
+ disable(): Promise<void>;
+ enable(): Promise<void>;
+ getState(): Promise<NavigationPreloadState>;
+ setHeaderValue(value: string): Promise<void>;
+}
+
+declare var NavigationPreloadManager: {
+ prototype: NavigationPreloadManager;
+ new(): NavigationPreloadManager;
+};
+
interface NavigatorConcurrentHardware {
readonly hardwareConcurrency: number;
}
@@ -2254,6 +2299,11 @@ interface NavigatorLanguage {
readonly languages: ReadonlyArray<string>;
}
+/** Available only in secure contexts. */
+interface NavigatorLocks {
+ readonly locks: LockManager;
+}
+
interface NavigatorNetworkInformation {
readonly connection: NetworkInformation;
}
@@ -2629,6 +2679,29 @@ declare var PushSubscriptionOptions: {
new(): PushSubscriptionOptions;
};
+interface RTCEncodedAudioFrame {
+ data: ArrayBuffer;
+ readonly timestamp: number;
+ getMetadata(): RTCEncodedAudioFrameMetadata;
+}
+
+declare var RTCEncodedAudioFrame: {
+ prototype: RTCEncodedAudioFrame;
+ new(): RTCEncodedAudioFrame;
+};
+
+interface RTCEncodedVideoFrame {
+ data: ArrayBuffer;
+ readonly timestamp: number;
+ readonly type: RTCEncodedVideoFrameType;
+ getMetadata(): RTCEncodedVideoFrameMetadata;
+}
+
+declare var RTCEncodedVideoFrame: {
+ prototype: RTCEncodedVideoFrame;
+ new(): RTCEncodedVideoFrame;
+};
+
/** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */
interface ReadableStream<R = any> {
readonly locked: boolean;
@@ -2704,7 +2777,7 @@ interface Request extends Body {
declare var Request: {
prototype: Request;
- new(input: RequestInfo, init?: RequestInit): Request;
+ new(input: RequestInfo | URL, init?: RequestInit): Request;
};
/** This Fetch API interface represents the response to a request. */
@@ -2849,6 +2922,7 @@ interface ServiceWorkerRegistrationEventMap {
interface ServiceWorkerRegistration extends EventTarget {
readonly active: ServiceWorker | null;
readonly installing: ServiceWorker | null;
+ readonly navigationPreload: NavigationPreloadManager;
onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
readonly pushManager: PushManager;
readonly scope: string;
@@ -2914,10 +2988,10 @@ interface SubtleCrypto {
encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
- generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
- generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
- importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
+ importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
@@ -3095,6 +3169,19 @@ declare var URLSearchParams: {
toString(): string;
};
+interface VideoColorSpace {
+ readonly fullRange: boolean | null;
+ readonly matrix: VideoMatrixCoefficients | null;
+ readonly primaries: VideoColorPrimaries | null;
+ readonly transfer: VideoTransferCharacteristics | null;
+ toJSON(): VideoColorSpaceInit;
+}
+
+declare var VideoColorSpace: {
+ prototype: VideoColorSpace;
+ new(init?: VideoColorSpaceInit): VideoColorSpace;
+};
+
interface WEBGL_color_buffer_float {
readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
readonly RGBA32F_EXT: GLenum;
@@ -3150,13 +3237,6 @@ interface WEBGL_compressed_texture_etc1 {
readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum;
}
-interface WEBGL_compressed_texture_pvrtc {
- readonly COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: GLenum;
- readonly COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: GLenum;
- readonly COMPRESSED_RGB_PVRTC_2BPPV1_IMG: GLenum;
- readonly COMPRESSED_RGB_PVRTC_4BPPV1_IMG: GLenum;
-}
-
/** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
interface WEBGL_compressed_texture_s3tc {
readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum;
@@ -4647,7 +4727,6 @@ interface WebGLRenderingContextBase {
getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
getExtension(extensionName: "WEBGL_compressed_texture_etc"): WEBGL_compressed_texture_etc | null;
getExtension(extensionName: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1 | null;
- getExtension(extensionName: "WEBGL_compressed_texture_pvrtc"): WEBGL_compressed_texture_pvrtc | null;
getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;
@@ -5203,11 +5282,12 @@ interface WindowOrWorkerGlobalScope {
clearTimeout(id?: number): void;
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
- fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+ fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
queueMicrotask(callback: VoidFunction): void;
reportError(e: any): void;
setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+ structuredClone(value: any, options?: StructuredSerializeOptions): any;
}
interface WorkerEventMap extends AbstractWorkerEventMap {
@@ -5291,7 +5371,7 @@ declare var WorkerLocation: {
};
/** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */
-interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
+interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
readonly mediaCapabilities: MediaCapabilities;
}
@@ -5742,11 +5822,12 @@ declare function clearInterval(id?: number): void;
declare function clearTimeout(id?: number): void;
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
-declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
declare function queueMicrotask(callback: VoidFunction): void;
declare function reportError(e: any): void;
declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
declare function cancelAnimationFrame(handle: number): void;
declare function requestAnimationFrame(callback: FrameRequestCallback): number;
declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
@@ -5827,6 +5908,7 @@ type PermissionState = "denied" | "granted" | "prompt";
type PredefinedColorSpace = "display-p3" | "srgb";
type PremultiplyAlpha = "default" | "none" | "premultiply";
type PushEncryptionKeyName = "auth" | "p256dh";
+type RTCEncodedVideoFrameType = "delta" | "empty" | "key";
type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
type RequestCredentials = "include" | "omit" | "same-origin";
@@ -5839,6 +5921,9 @@ type SecurityPolicyViolationEventDisposition = "enforce" | "report";
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
type TransferFunction = "hlg" | "pq" | "srgb";
+type VideoColorPrimaries = "bt470bg" | "bt709" | "smpte170m";
+type VideoMatrixCoefficients = "bt470bg" | "bt709" | "rgb" | "smpte170m";
+type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m";
type WebGLPowerPreference = "default" | "high-performance" | "low-power";
type WorkerType = "classic" | "module";
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";