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.ts143
1 files changed, 127 insertions, 16 deletions
diff --git a/cli/dts/lib.webworker.d.ts b/cli/dts/lib.webworker.d.ts
index 242db956a..f6b3d43b3 100644
--- a/cli/dts/lib.webworker.d.ts
+++ b/cli/dts/lib.webworker.d.ts
@@ -90,8 +90,8 @@ interface CloseEventInit extends EventInit {
}
interface CryptoKeyPair {
- privateKey?: CryptoKey;
- publicKey?: CryptoKey;
+ privateKey: CryptoKey;
+ publicKey: CryptoKey;
}
interface CustomEventInit<T = any> extends EventInit {
@@ -210,6 +210,18 @@ interface FilePropertyBag extends BlobPropertyBag {
lastModified?: number;
}
+interface FileSystemGetDirectoryOptions {
+ create?: boolean;
+}
+
+interface FileSystemGetFileOptions {
+ create?: boolean;
+}
+
+interface FileSystemRemoveOptions {
+ recursive?: boolean;
+}
+
interface FontFaceDescriptors {
display?: string;
featureSettings?: string;
@@ -310,6 +322,24 @@ 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;
}
@@ -373,7 +403,7 @@ interface NotificationOptions {
requireInteraction?: boolean;
silent?: boolean;
tag?: string;
- timestamp?: DOMTimeStamp;
+ timestamp?: EpochTimeStamp;
vibrate?: VibratePattern;
}
@@ -422,7 +452,7 @@ interface PushEventInit extends ExtendableEventInit {
interface PushSubscriptionJSON {
endpoint?: string;
- expirationTime?: DOMTimeStamp | null;
+ expirationTime?: EpochTimeStamp | null;
keys?: Record<string, string>;
}
@@ -578,7 +608,7 @@ interface StreamPipeOptions {
}
interface StructuredSerializeOptions {
- transfer?: any[];
+ transfer?: Transferable[];
}
interface TextDecodeOptions {
@@ -665,7 +695,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(): void;
+ abort(reason?: any): void;
}
declare var AbortController: {
@@ -905,6 +935,8 @@ interface Crypto {
/** Available only in secure contexts. */
readonly subtle: SubtleCrypto;
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
+ /** Available only in secure contexts. */
+ randomUUID(): string;
}
declare var Crypto: {
@@ -1358,8 +1390,10 @@ interface EventSource extends EventTarget {
readonly CONNECTING: number;
readonly OPEN: number;
addEventListener<K extends keyof EventSourceEventMap>(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<K extends keyof EventSourceEventMap>(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;
}
@@ -1518,6 +1552,43 @@ declare var FileReaderSync: {
new(): FileReaderSync;
};
+/** Available only in secure contexts. */
+interface FileSystemDirectoryHandle extends FileSystemHandle {
+ readonly kind: "directory";
+ getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
+ getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
+ removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
+ resolve(possibleDescendant: FileSystemHandle): Promise<string[] | null>;
+}
+
+declare var FileSystemDirectoryHandle: {
+ prototype: FileSystemDirectoryHandle;
+ new(): FileSystemDirectoryHandle;
+};
+
+/** Available only in secure contexts. */
+interface FileSystemFileHandle extends FileSystemHandle {
+ readonly kind: "file";
+ getFile(): Promise<File>;
+}
+
+declare var FileSystemFileHandle: {
+ prototype: FileSystemFileHandle;
+ new(): FileSystemFileHandle;
+};
+
+/** Available only in secure contexts. */
+interface FileSystemHandle {
+ readonly kind: FileSystemHandleKind;
+ readonly name: string;
+ isSameEntry(other: FileSystemHandle): Promise<boolean>;
+}
+
+declare var FileSystemHandle: {
+ prototype: FileSystemHandle;
+ new(): FileSystemHandle;
+};
+
interface FontFace {
ascentOverride: string;
descentOverride: string;
@@ -1981,6 +2052,7 @@ interface IDBTransactionEventMap {
interface IDBTransaction extends EventTarget {
/** Returns the transaction's connection. */
readonly db: IDBDatabase;
+ readonly durability: IDBTransactionDurability;
/** If the transaction was aborted, returns the error (a DOMException) providing the reason. */
readonly error: DOMException | null;
/** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */
@@ -2061,6 +2133,29 @@ interface KHR_parallel_shader_compile {
readonly COMPLETION_STATUS_KHR: GLenum;
}
+/** Available only in secure contexts. */
+interface Lock {
+ readonly mode: LockMode;
+ readonly name: string;
+}
+
+declare var Lock: {
+ prototype: Lock;
+ new(): Lock;
+};
+
+/** Available only in secure contexts. */
+interface LockManager {
+ query(): Promise<LockManagerSnapshot>;
+ request(name: string, callback: LockGrantedCallback): Promise<any>;
+ request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>;
+}
+
+declare var LockManager: {
+ prototype: LockManager;
+ new(): LockManager;
+};
+
interface MediaCapabilities {
decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
@@ -2481,7 +2576,7 @@ declare var PushEvent: {
*/
interface PushManager {
getSubscription(): Promise<PushSubscription | null>;
- permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
+ permissionState(options?: PushSubscriptionOptionsInit): Promise<PermissionState>;
subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
}
@@ -2798,6 +2893,7 @@ declare var SharedWorkerGlobalScope: {
/** Available only in secure contexts. */
interface StorageManager {
estimate(): Promise<StorageEstimate>;
+ getDirectory(): Promise<FileSystemDirectoryHandle>;
persisted(): Promise<boolean>;
}
@@ -3134,6 +3230,13 @@ interface WEBGL_lose_context {
restoreContext(): void;
}
+interface WEBGL_multi_draw {
+ multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
+ multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void;
+}
+
interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
}
@@ -5075,7 +5178,7 @@ declare var WebSocket: {
/** This ServiceWorker API interface represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources. */
interface WindowClient extends Client {
readonly focused: boolean;
- readonly visibilityState: VisibilityState;
+ readonly visibilityState: DocumentVisibilityState;
focus(): Promise<WindowClient>;
navigate(url: string | URL): Promise<WindowClient | null>;
}
@@ -5096,12 +5199,13 @@ interface WindowOrWorkerGlobalScope {
readonly performance: Performance;
atob(data: string): string;
btoa(data: string): string;
- clearInterval(handle?: number): void;
- clearTimeout(handle?: number): void;
+ clearInterval(id?: number): void;
+ 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>;
queueMicrotask(callback: VoidFunction): void;
+ reportError(e: any): void;
setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
}
@@ -5518,7 +5622,7 @@ declare namespace WebAssembly {
type ImportExportKind = "function" | "global" | "memory" | "table";
type TableKind = "anyfunc" | "externref";
- type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64";
+ type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
type ExportValue = Function | Global | Memory | Table;
type Exports = Record<string, ExportValue>;
type ImportValue = ExportValue | number;
@@ -5536,6 +5640,10 @@ interface FrameRequestCallback {
(time: DOMHighResTimeStamp): void;
}
+interface LockGrantedCallback {
+ (lock: Lock | null): any;
+}
+
interface OnErrorEventHandlerNonNull {
(event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
}
@@ -5630,12 +5738,13 @@ declare var origin: string;
declare var performance: Performance;
declare function atob(data: string): string;
declare function btoa(data: string): string;
-declare function clearInterval(handle?: number): void;
-declare function clearTimeout(handle?: number): void;
+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 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 cancelAnimationFrame(handle: number): void;
@@ -5652,7 +5761,7 @@ type BodyInit = ReadableStream | XMLHttpRequestBodyInit;
type BufferSource = ArrayBufferView | ArrayBuffer;
type CanvasImageSource = ImageBitmap | OffscreenCanvas;
type DOMHighResTimeStamp = number;
-type DOMTimeStamp = number;
+type EpochTimeStamp = number;
type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
type Float32List = Float32Array | GLfloat[];
type FormDataEntryValue = File | string;
@@ -5693,18 +5802,22 @@ type ClientTypes = "all" | "sharedworker" | "window" | "worker";
type ColorGamut = "p3" | "rec2020" | "srgb";
type ColorSpaceConversion = "default" | "none";
type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi";
+type DocumentVisibilityState = "hidden" | "visible";
type EndingType = "native" | "transparent";
+type FileSystemHandleKind = "directory" | "file";
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
type FontFaceSetLoadStatus = "loaded" | "loading";
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
type IDBRequestReadyState = "done" | "pending";
+type IDBTransactionDurability = "default" | "relaxed" | "strict";
type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
type ImageOrientation = "flipY" | "none";
type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
type KeyType = "private" | "public" | "secret";
type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
+type LockMode = "exclusive" | "shared";
type MediaDecodingType = "file" | "media-source" | "webrtc";
type MediaEncodingType = "record" | "webrtc";
type NotificationDirection = "auto" | "ltr" | "rtl";
@@ -5714,7 +5827,6 @@ type PermissionState = "denied" | "granted" | "prompt";
type PredefinedColorSpace = "display-p3" | "srgb";
type PremultiplyAlpha = "default" | "none" | "premultiply";
type PushEncryptionKeyName = "auth" | "p256dh";
-type PushPermissionState = "denied" | "granted" | "prompt";
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";
@@ -5727,7 +5839,6 @@ type SecurityPolicyViolationEventDisposition = "enforce" | "report";
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
type TransferFunction = "hlg" | "pq" | "srgb";
-type VisibilityState = "hidden" | "visible";
type WebGLPowerPreference = "default" | "high-performance" | "low-power";
type WorkerType = "classic" | "module";
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";