diff --git a/baselines/audioworklet.generated.d.ts b/baselines/audioworklet.generated.d.ts index be0c723c6..1e89f9a55 100644 --- a/baselines/audioworklet.generated.d.ts +++ b/baselines/audioworklet.generated.d.ts @@ -260,7 +260,7 @@ declare var AbortSignal: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */ - any(signals: AbortSignal[]): AbortSignal; + any(signals: Iterable): AbortSignal; }; /** @@ -766,7 +766,7 @@ interface MessageEvent extends Event { */ readonly source: MessageEventSource | null; /** @deprecated */ - initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void; + initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; } declare var MessageEvent: { @@ -899,6 +899,10 @@ declare var ReadableByteStreamController: { new(): ReadableByteStreamController; }; + +interface ReadableStreamAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): ReadableStreamAsyncIterator; +} /** * The **`ReadableStream`** interface of the Streams API 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. * @@ -943,6 +947,8 @@ interface ReadableStream { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */ tee(): [ReadableStream, ReadableStream]; + [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; } declare var ReadableStream: { @@ -1351,6 +1357,10 @@ declare var URL: { parse(url: string | URL, base?: string | URL): URL | null; }; + +interface URLSearchParamsIterator extends IteratorObject { + [Symbol.iterator](): URLSearchParamsIterator; +} /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -1407,11 +1417,18 @@ interface URLSearchParams { sort(): void; toString(): string; forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void; + [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; + /** Returns an array of key, value pairs for every entry in the search params. */ + entries(): URLSearchParamsIterator<[string, string]>; + /** Returns a list of keys in the search params. */ + keys(): URLSearchParamsIterator; + /** Returns a list of values in the search params. */ + values(): URLSearchParamsIterator; } declare var URLSearchParams: { prototype: URLSearchParams; - new(init?: string[][] | Record | string | URLSearchParams): URLSearchParams; + new(init?: Iterable | Record | string): URLSearchParams; }; /** @@ -1584,7 +1601,7 @@ declare namespace WebAssembly { var Exception: { prototype: Exception; - new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + new(exceptionTag: Tag, payload: Iterable, options?: ExceptionOptions): Exception; }; /** @@ -1917,7 +1934,7 @@ interface Console { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */ - table(tabularData?: any, properties?: string[]): void; + table(tabularData?: any, properties?: Iterable): void; /** * The **`console.time()`** static method starts a timer you can use to track how long an operation takes. You give each timer a unique name, and may have up to 10,000 timers running on a given page. When you call console.timeEnd() with the same name, the browser will output the time, in milliseconds, that elapsed since the timer was started. * @@ -2038,41 +2055,3 @@ type Transferable = MessagePort | ReadableStream | WritableStream | TransformStr type CompressionFormat = "deflate" | "deflate-raw" | "gzip"; type ReadableStreamReaderMode = "byob"; type ReadableStreamType = "bytes"; - - -///////////////////////////// -/// AudioWorklet Iterable APIs -///////////////////////////// - -interface MessageEvent { - /** @deprecated */ - initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; -} - -interface URLSearchParamsIterator extends IteratorObject { - [Symbol.iterator](): URLSearchParamsIterator; -} - -interface URLSearchParams { - [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; - /** Returns an array of key, value pairs for every entry in the search params. */ - entries(): URLSearchParamsIterator<[string, string]>; - /** Returns a list of keys in the search params. */ - keys(): URLSearchParamsIterator; - /** Returns a list of values in the search params. */ - values(): URLSearchParamsIterator; -} - - -///////////////////////////// -/// AudioWorklet Async Iterable APIs -///////////////////////////// - -interface ReadableStreamAsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): ReadableStreamAsyncIterator; -} - -interface ReadableStream { - [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; - values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; -} diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index d66787925..4f3831ac0 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -3403,7 +3403,7 @@ declare var AbortSignal: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */ - any(signals: AbortSignal[]): AbortSignal; + any(signals: Iterable): AbortSignal; /** * The **`AbortSignal.timeout()`** static method returns an AbortSignal that will automatically abort after a specified time. * @@ -4512,7 +4512,7 @@ interface AudioParam { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime) */ - setValueCurveAtTime(values: number[] | Float32Array, startTime: number, duration: number): AudioParam; + setValueCurveAtTime(values: Iterable, startTime: number, duration: number): AudioParam; } declare var AudioParam: { @@ -4525,7 +4525,7 @@ declare var AudioParam: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParamMap) */ -interface AudioParamMap { +interface AudioParamMap extends ReadonlyMap { forEach(callbackfn: (value: AudioParam, key: string, parent: AudioParamMap) => void, thisArg?: any): void; } @@ -4890,7 +4890,7 @@ interface BaseAudioContext extends EventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createIIRFilter) */ - createIIRFilter(feedforward: number[], feedback: number[]): IIRFilterNode; + createIIRFilter(feedforward: Iterable, feedback: Iterable): IIRFilterNode; /** * The **`createOscillator()`** method of the BaseAudioContext interface creates an OscillatorNode, a source representing a periodic waveform. It basically generates a constant tone. * @@ -4908,7 +4908,7 @@ interface BaseAudioContext extends EventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createPeriodicWave) */ - createPeriodicWave(real: number[] | Float32Array, imag: number[] | Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave; + createPeriodicWave(real: Iterable, imag: Iterable, constraints?: PeriodicWaveConstraints): PeriodicWave; /** * The **`createScriptProcessor()`** method of the BaseAudioContext interface creates a ScriptProcessorNode used for direct audio processing. * @deprecated @@ -5066,7 +5066,7 @@ interface Blob { declare var Blob: { prototype: Blob; - new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; + new(blobParts?: Iterable, options?: BlobPropertyBag): Blob; }; /** @@ -5570,6 +5570,7 @@ interface CSSKeyframesRule extends CSSRule { */ findRule(select: string): CSSKeyframeRule | null; [index: number]: CSSKeyframeRule; + [Symbol.iterator](): ArrayIterator; } declare var CSSKeyframesRule: { @@ -5876,6 +5877,10 @@ interface CSSNumericArray { readonly length: number; forEach(callbackfn: (value: CSSNumericValue, key: number, parent: CSSNumericArray) => void, thisArg?: any): void; [index: number]: CSSNumericValue; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSNumericValue]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var CSSNumericArray: { @@ -6377,6 +6382,7 @@ interface CSSRuleList { */ item(index: number): CSSRule | null; [index: number]: CSSRule; + [Symbol.iterator](): ArrayIterator; } declare var CSSRuleList: { @@ -6571,6 +6577,7 @@ interface CSSStyleDeclarationBase { */ setProperty(property: string, value: string | null, priority?: string): void; [index: number]: string; + [Symbol.iterator](): ArrayIterator; } interface CSSStyleDeclaration extends CSSStyleProperties { @@ -9967,11 +9974,15 @@ interface CSSTransformValue extends CSSStyleValue { toMatrix(): DOMMatrix; forEach(callbackfn: (value: CSSTransformComponent, key: number, parent: CSSTransformValue) => void, thisArg?: any): void; [index: number]: CSSTransformComponent; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSTransformComponent]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var CSSTransformValue: { prototype: CSSTransformValue; - new(transforms: CSSTransformComponent[]): CSSTransformValue; + new(transforms: Iterable): CSSTransformValue; }; /** @@ -10067,11 +10078,15 @@ interface CSSUnparsedValue extends CSSStyleValue { readonly length: number; forEach(callbackfn: (value: CSSUnparsedSegment, key: number, parent: CSSUnparsedValue) => void, thisArg?: any): void; [index: number]: CSSUnparsedSegment; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSUnparsedSegment]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var CSSUnparsedValue: { prototype: CSSUnparsedValue; - new(members: CSSUnparsedSegment[]): CSSUnparsedValue; + new(members: Iterable): CSSUnparsedValue; }; /** @@ -10142,7 +10157,7 @@ interface Cache { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) */ - addAll(requests: RequestInfo[]): Promise; + addAll(requests: Iterable): Promise; /** * The **`delete()`** method of the Cache interface finds the Cache entry whose key is the request, and if found, deletes the Cache entry and returns a Promise that resolves to true. If no Cache entry is found, it resolves to false. * @@ -10364,7 +10379,7 @@ interface CanvasPath { /** [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; + roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable): void; } interface CanvasPathDrawingStyles { @@ -10381,7 +10396,7 @@ interface CanvasPathDrawingStyles { /** [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; + setLineDash(segments: Iterable): void; } /** @@ -11037,13 +11052,13 @@ interface CookieStoreManager { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/subscribe) */ - subscribe(subscriptions: CookieStoreGetOptions[]): Promise; + subscribe(subscriptions: Iterable): Promise; /** * The **`unsubscribe()`** method of the CookieStoreManager interface stops the ServiceWorkerRegistration from receiving previously subscribed events. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/unsubscribe) */ - unsubscribe(subscriptions: CookieStoreGetOptions[]): Promise; + unsubscribe(subscriptions: Iterable): Promise; } declare var CookieStoreManager: { @@ -11282,7 +11297,7 @@ declare var CustomEvent: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomStateSet) */ -interface CustomStateSet { +interface CustomStateSet extends Set { forEach(callbackfn: (value: string, key: string, parent: CustomStateSet) => void, thisArg?: any): void; } @@ -11537,7 +11552,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | Iterable): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -11729,7 +11744,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | Iterable): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * @@ -11996,6 +12011,7 @@ interface DOMRectList { */ item(index: number): DOMRect | null; [index: number]: DOMRect; + [Symbol.iterator](): ArrayIterator; } declare var DOMRectList: { @@ -12101,6 +12117,7 @@ interface DOMStringList { */ item(index: number): string | null; [index: number]: string; + [Symbol.iterator](): ArrayIterator; } declare var DOMStringList: { @@ -12185,6 +12202,10 @@ interface DOMTokenList { toggle(token: string, force?: boolean): boolean; forEach(callbackfn: (value: string, key: number, parent: DOMTokenList) => void, thisArg?: any): void; [index: number]: string; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, string]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var DOMTokenList: { @@ -12334,6 +12355,7 @@ interface DataTransferItemList { */ remove(index: number): void; [index: number]: DataTransferItem; + [Symbol.iterator](): ArrayIterator; } declare var DataTransferItemList: { @@ -14272,7 +14294,7 @@ declare var Event: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventCounts) */ -interface EventCounts { +interface EventCounts extends ReadonlyMap { forEach(callbackfn: (value: number, key: string, parent: EventCounts) => void, thisArg?: any): void; } @@ -14423,7 +14445,7 @@ interface File extends Blob { declare var File: { prototype: File; - new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File; + new(fileBits: Iterable, fileName: string, options?: FilePropertyBag): File; }; /** @@ -14445,6 +14467,7 @@ interface FileList { */ item(index: number): File | null; [index: number]: File; + [Symbol.iterator](): ArrayIterator; } declare var FileList: { @@ -14601,6 +14624,10 @@ declare var FileSystemDirectoryEntry: { new(): FileSystemDirectoryEntry; }; + +interface FileSystemDirectoryHandleAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator; +} /** * The **`FileSystemDirectoryHandle`** interface of the File System API provides a handle to a file system directory. * Available only in secure contexts. @@ -14633,6 +14660,10 @@ interface FileSystemDirectoryHandle extends FileSystemHandle { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/resolve) */ resolve(possibleDescendant: FileSystemHandle): Promise; + [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; + entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; + keys(): FileSystemDirectoryHandleAsyncIterator; + values(): FileSystemDirectoryHandleAsyncIterator; } declare var FileSystemDirectoryHandle: { @@ -14945,7 +14976,7 @@ interface FontFaceSetEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */ -interface FontFaceSet extends EventTarget { +interface FontFaceSet extends EventTarget, Set { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */ onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */ @@ -15012,6 +15043,10 @@ interface FontFaceSource { readonly fonts: FontFaceSet; } + +interface FormDataIterator extends IteratorObject { + [Symbol.iterator](): FormDataIterator; +} /** * The **`FormData`** interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using the fetch(), XMLHttpRequest.send() or navigator.sendBeacon() methods. It uses the same format a form would use if the encoding type were set to "multipart/form-data". * @@ -15059,6 +15094,13 @@ interface FormData { 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; + [Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>; + /** Returns an array of key, value pairs for every entry in the list. */ + entries(): FormDataIterator<[string, FormDataEntryValue]>; + /** Returns a list of keys in the list. */ + keys(): FormDataIterator; + /** Returns a list of values in the list. */ + values(): FormDataIterator; } declare var FormData: { @@ -15254,7 +15296,7 @@ declare var GPUBindGroupLayout: { interface GPUBindingCommandsMixin { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ - setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void; + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void; } @@ -15409,19 +15451,19 @@ interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ - copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ - copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void; + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ - copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer. * @@ -15910,7 +15952,7 @@ interface GPUQueue extends GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ - copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void; + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`onSubmittedWorkDone()`** method of the GPUQueue interface returns a Promise that resolves when all the work submitted to the GPU via this GPUQueue at the point the method is called has been processed. * @@ -15922,7 +15964,7 @@ interface GPUQueue extends GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ - submit(commandBuffers: GPUCommandBuffer[]): void; + submit(commandBuffers: Iterable): void; /** * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer. * @@ -15934,7 +15976,7 @@ interface GPUQueue extends GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ - writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void; + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D | Iterable): void; } declare var GPUQueue: { @@ -16023,13 +16065,13 @@ interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommands * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ - executeBundles(bundles: GPURenderBundle[]): void; + executeBundles(bundles: Iterable): void; /** * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ - setBlendConstant(color: GPUColor): void; + setBlendConstant(color: GPUColor | Iterable): void; /** * The **`setScissorRect()`** method of the GPURenderPassEncoder interface sets the scissor rectangle used during the rasterization stage. After transformation into viewport coordinates any fragments that fall outside the scissor rectangle will be discarded. * @@ -16109,7 +16151,7 @@ declare var GPUShaderModule: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures) */ -interface GPUSupportedFeatures { +interface GPUSupportedFeatures extends ReadonlySet { forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void; } @@ -17001,6 +17043,7 @@ interface HTMLAllCollection { */ namedItem(name: string): HTMLCollection | Element | null; [index: number]: Element; + [Symbol.iterator](): ArrayIterator; } declare var HTMLAllCollection: { @@ -17474,6 +17517,7 @@ interface HTMLCollectionBase { */ item(index: number): Element | null; [index: number]: Element; + [Symbol.iterator](): ArrayIterator; } interface HTMLCollection extends HTMLCollectionBase { @@ -17494,6 +17538,7 @@ interface HTMLCollectionOf extends HTMLCollectionBase { item(index: number): T | null; namedItem(name: string): T | null; [index: number]: T; + [Symbol.iterator](): ArrayIterator; } /** @@ -18192,6 +18237,7 @@ interface HTMLFormElement extends HTMLElement { removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; [index: number]: Element; [name: string]: any; + [Symbol.iterator](): ArrayIterator; } declare var HTMLFormElement: { @@ -20616,6 +20662,7 @@ interface HTMLSelectElement extends HTMLElement { removeEventListener(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; [name: number]: HTMLOptionElement | HTMLOptGroupElement; + [Symbol.iterator](): ArrayIterator; } declare var HTMLSelectElement: { @@ -21800,6 +21847,10 @@ declare var HashChangeEvent: { new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent; }; + +interface HeadersIterator extends IteratorObject { + [Symbol.iterator](): HeadersIterator; +} /** * The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing headers from the list of the request's headers. * @@ -21843,11 +21894,18 @@ interface Headers { */ set(name: string, value: string): void; forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void; + [Symbol.iterator](): HeadersIterator<[string, string]>; + /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ + entries(): HeadersIterator<[string, string]>; + /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */ + keys(): HeadersIterator; + /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ + values(): HeadersIterator; } declare var Headers: { prototype: Headers; - new(init?: HeadersInit): Headers; + new(init?: HeadersInit | Iterable<[string, string]>): Headers; }; /** @@ -21855,7 +21913,7 @@ declare var Headers: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight) */ -interface Highlight { +interface Highlight extends Set { /** * The **`priority`** property of the Highlight interface is a number used to determine which highlight's styles should be used to resolve style conflicts in overlapping parts. Highlights with a higher priority number have preference over those with a lower priority. * @@ -21881,7 +21939,7 @@ declare var Highlight: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HighlightRegistry) */ -interface HighlightRegistry { +interface HighlightRegistry extends Map { forEach(callbackfn: (value: Highlight, key: string, parent: HighlightRegistry) => void, thisArg?: any): void; } @@ -22104,7 +22162,7 @@ interface IDBDatabase extends EventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction) */ - transaction(storeNames: string | string[], mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction; + transaction(storeNames: string | Iterable, 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; @@ -22364,7 +22422,7 @@ interface IDBObjectStore { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex) */ - createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex; + createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; /** * The **`delete()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, deletes the specified record or records. * @@ -22930,6 +22988,7 @@ interface ImageTrackList { */ readonly selectedTrack: ImageTrack | null; [index: number]: ImageTrack; + [Symbol.iterator](): ArrayIterator; } declare var ImageTrackList: { @@ -23579,7 +23638,7 @@ declare var MIDIInput: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIInputMap) */ -interface MIDIInputMap { +interface MIDIInputMap extends ReadonlyMap { forEach(callbackfn: (value: MIDIInput, key: string, parent: MIDIInputMap) => void, thisArg?: any): void; } @@ -23620,7 +23679,7 @@ interface MIDIOutput extends MIDIPort { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutput/send) */ - send(data: number[], timestamp?: DOMHighResTimeStamp): void; + send(data: Iterable, timestamp?: DOMHighResTimeStamp): void; addEventListener(type: K, listener: (this: MIDIOutput, ev: MIDIPortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MIDIOutput, ev: MIDIPortEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -23638,7 +23697,7 @@ declare var MIDIOutput: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutputMap) */ -interface MIDIOutputMap { +interface MIDIOutputMap extends ReadonlyMap { forEach(callbackfn: (value: MIDIOutput, key: string, parent: MIDIOutputMap) => void, thisArg?: any): void; } @@ -24046,6 +24105,10 @@ declare var MediaKeySession: { new(): MediaKeySession; }; + +interface MediaKeyStatusMapIterator extends IteratorObject { + [Symbol.iterator](): MediaKeyStatusMapIterator; +} /** * The **`MediaKeyStatusMap`** interface of the Encrypted Media Extensions API is a read-only map of media key statuses by key IDs. * Available only in secure contexts. @@ -24072,6 +24135,10 @@ interface MediaKeyStatusMap { */ has(keyId: BufferSource): boolean; forEach(callbackfn: (value: MediaKeyStatus, key: BufferSource, parent: MediaKeyStatusMap) => void, thisArg?: any): void; + [Symbol.iterator](): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>; + entries(): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>; + keys(): MediaKeyStatusMapIterator; + values(): MediaKeyStatusMapIterator; } declare var MediaKeyStatusMap: { @@ -24181,6 +24248,7 @@ interface MediaList { */ item(index: number): string | null; [index: number]: string; + [Symbol.iterator](): ArrayIterator; } declare var MediaList: { @@ -24639,7 +24707,7 @@ declare var MediaStream: { prototype: MediaStream; new(): MediaStream; new(stream: MediaStream): MediaStream; - new(tracks: MediaStreamTrack[]): MediaStream; + new(tracks: Iterable): MediaStream; }; /** @@ -24868,7 +24936,7 @@ interface MessageEvent extends Event { */ readonly source: MessageEventSource | null; /** @deprecated */ - initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void; + initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; } declare var MessageEvent: { @@ -24982,6 +25050,7 @@ interface MimeTypeArray { /** @deprecated */ namedItem(name: string): MimeType | null; [index: number]: MimeType; + [Symbol.iterator](): ArrayIterator; } /** @deprecated */ @@ -25295,6 +25364,7 @@ interface NamedNodeMap { */ setNamedItemNS(attr: Attr): Attr | null; [index: number]: Attr; + [Symbol.iterator](): ArrayIterator; } declare var NamedNodeMap: { @@ -25867,7 +25937,7 @@ interface Navigator extends NavigatorAutomationInformation, NavigatorBadge, Navi * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/requestMediaKeySystemAccess) */ - requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise; + requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable): Promise; /** * The **`navigator.sendBeacon()`** method asynchronously sends an HTTP POST request containing a small amount of data to a web server. * @@ -25886,7 +25956,7 @@ interface Navigator extends NavigatorAutomationInformation, NavigatorBadge, Navi * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/vibrate) */ - vibrate(pattern: VibratePattern): boolean; + vibrate(pattern: VibratePattern | Iterable): boolean; } declare var Navigator: { @@ -26342,6 +26412,13 @@ interface NodeList { item(index: number): Node | null; forEach(callbackfn: (value: Node, key: number, parent: NodeList) => void, thisArg?: any): void; [index: number]: Node; + [Symbol.iterator](): ArrayIterator; + /** Returns an array of key, value pairs for every entry in the list. */ + entries(): ArrayIterator<[number, Node]>; + /** Returns an list of keys in the list. */ + keys(): ArrayIterator; + /** Returns an list of values in the list. */ + values(): ArrayIterator; } declare var NodeList: { @@ -26353,6 +26430,13 @@ interface NodeListOf extends NodeList { item(index: number): TNode; forEach(callbackfn: (value: TNode, key: number, parent: NodeListOf) => void, thisArg?: any): void; [index: number]: TNode; + [Symbol.iterator](): ArrayIterator; + /** Returns an array of key, value pairs for every entry in the list. */ + entries(): ArrayIterator<[number, TNode]>; + /** Returns an list of keys in the list. */ + keys(): ArrayIterator; + /** Returns an list of values in the list. */ + values(): ArrayIterator; } interface NonDocumentTypeChildNode { @@ -27298,7 +27382,7 @@ interface PaymentRequest extends EventTarget { declare var PaymentRequest: { prototype: PaymentRequest; - new(methodData: PaymentMethodData[], details: PaymentDetailsInit, options?: PaymentOptions): PaymentRequest; + new(methodData: Iterable, details: PaymentDetailsInit, options?: PaymentOptions): PaymentRequest; }; /** @@ -28367,6 +28451,7 @@ interface Plugin { /** @deprecated */ namedItem(name: string): MimeType | null; [index: number]: MimeType; + [Symbol.iterator](): ArrayIterator; } /** @deprecated */ @@ -28391,6 +28476,7 @@ interface PluginArray { /** @deprecated */ refresh(): void; [index: number]: Plugin; + [Symbol.iterator](): ArrayIterator; } /** @deprecated */ @@ -29729,7 +29815,7 @@ interface RTCRtpScriptTransform { declare var RTCRtpScriptTransform: { prototype: RTCRtpScriptTransform; - new(worker: Worker, options?: any, transfer?: any[]): RTCRtpScriptTransform; + new(worker: Worker, options?: any, transfer?: Iterable): RTCRtpScriptTransform; }; /** @@ -29846,7 +29932,7 @@ interface RTCRtpTransceiver { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpTransceiver/setCodecPreferences) */ - setCodecPreferences(codecs: RTCRtpCodec[]): void; + setCodecPreferences(codecs: Iterable): void; /** * The **`stop()`** method in the RTCRtpTransceiver interface permanently stops the transceiver by stopping both the associated RTCRtpSender and RTCRtpReceiver. * @@ -29943,7 +30029,7 @@ declare var RTCSessionDescription: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCStatsReport) */ -interface RTCStatsReport { +interface RTCStatsReport extends ReadonlyMap { forEach(callbackfn: (value: any, key: string, parent: RTCStatsReport) => void, thisArg?: any): void; } @@ -30218,6 +30304,10 @@ declare var ReadableByteStreamController: { new(): ReadableByteStreamController; }; + +interface ReadableStreamAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): ReadableStreamAsyncIterator; +} /** * The **`ReadableStream`** interface of the Streams API 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. * @@ -30262,6 +30352,8 @@ interface ReadableStream { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */ tee(): [ReadableStream, ReadableStream]; + [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; } declare var ReadableStream: { @@ -32994,6 +33086,7 @@ interface SVGLengthList { */ replaceItem(newItem: SVGLength, index: number): SVGLength; [index: number]: SVGLength; + [Symbol.iterator](): ArrayIterator; } declare var SVGLengthList: { @@ -33335,6 +33428,7 @@ interface SVGNumberList { */ replaceItem(newItem: SVGNumber, index: number): SVGNumber; [index: number]: SVGNumber; + [Symbol.iterator](): ArrayIterator; } declare var SVGNumberList: { @@ -33497,6 +33591,7 @@ interface SVGPointList { */ replaceItem(newItem: DOMPoint, index: number): DOMPoint; [index: number]: DOMPoint; + [Symbol.iterator](): ArrayIterator; } declare var SVGPointList: { @@ -33989,6 +34084,7 @@ interface SVGStringList { */ replaceItem(newItem: string, index: number): string; [index: number]: string; + [Symbol.iterator](): ArrayIterator; } declare var SVGStringList: { @@ -34463,6 +34559,7 @@ interface SVGTransformList { */ replaceItem(newItem: SVGTransform, index: number): SVGTransform; [index: number]: SVGTransform; + [Symbol.iterator](): ArrayIterator; } declare var SVGTransformList: { @@ -35468,6 +35565,7 @@ interface SourceBufferList extends EventTarget { removeEventListener(type: K, listener: (this: SourceBufferList, ev: SourceBufferListEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; [index: number]: SourceBuffer; + [Symbol.iterator](): ArrayIterator; } declare var SourceBufferList: { @@ -35579,6 +35677,7 @@ interface SpeechRecognitionResult { */ item(index: number): SpeechRecognitionAlternative; [index: number]: SpeechRecognitionAlternative; + [Symbol.iterator](): ArrayIterator; } declare var SpeechRecognitionResult: { @@ -35606,6 +35705,7 @@ interface SpeechRecognitionResultList { */ item(index: number): SpeechRecognitionResult; [index: number]: SpeechRecognitionResult; + [Symbol.iterator](): ArrayIterator; } declare var SpeechRecognitionResultList: { @@ -36073,6 +36173,10 @@ declare var StylePropertyMap: { new(): StylePropertyMap; }; + +interface StylePropertyMapReadOnlyIterator extends IteratorObject { + [Symbol.iterator](): StylePropertyMapReadOnlyIterator; +} /** * The **`StylePropertyMapReadOnly`** interface of the CSS Typed Object Model API provides a read-only representation of a CSS declaration block that is an alternative to CSSStyleDeclaration. Retrieve an instance of this interface using Element.computedStyleMap(). * @@ -36104,6 +36208,10 @@ interface StylePropertyMapReadOnly { */ has(property: string): boolean; forEach(callbackfn: (value: CSSStyleValue[], key: string, parent: StylePropertyMapReadOnly) => void, thisArg?: any): void; + [Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, CSSStyleValue[]]>; + entries(): StylePropertyMapReadOnlyIterator<[string, CSSStyleValue[]]>; + keys(): StylePropertyMapReadOnlyIterator; + values(): StylePropertyMapReadOnlyIterator; } declare var StylePropertyMapReadOnly: { @@ -36186,6 +36294,7 @@ interface StyleSheetList { */ item(index: number): CSSStyleSheet | null; [index: number]: CSSStyleSheet; + [Symbol.iterator](): ArrayIterator; } declare var StyleSheetList: { @@ -36236,7 +36345,7 @@ interface SubtleCrypto { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; + deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`digest()`** method of the SubtleCrypto interface generates a digest of the given data, using the specified hash function. A digest is a short fixed-length value derived from some variable-length input. Cryptographic digests should exhibit collision-resistance, meaning that it's hard to come up with two different inputs that have the same digest value. * @@ -36266,14 +36375,14 @@ interface SubtleCrypto { generateKey(algorithm: "X25519" | { name: "X25519" }, extractable: boolean, keyUsages: ReadonlyArray<"deriveBits" | "deriveKey">): Promise; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; - generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; + generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */ importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray): Promise; - importKey(format: Exclude, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; + importKey(format: Exclude, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`sign()`** method of the SubtleCrypto interface generates a digital signature. * @@ -36285,7 +36394,7 @@ interface SubtleCrypto { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */ - unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; + unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`verify()`** method of the SubtleCrypto interface verifies a digital signature. * @@ -36375,7 +36484,7 @@ declare var TaskSignal: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static) */ - any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal; + any(signals: Iterable, init?: TaskSignalAnyInit): TaskSignal; }; /** @@ -36783,6 +36892,7 @@ interface TextTrackCueList { */ getCueById(id: string): TextTrackCue | null; [index: number]: TextTrackCue; + [Symbol.iterator](): ArrayIterator; } declare var TextTrackCueList: { @@ -36825,6 +36935,7 @@ interface TextTrackList extends EventTarget { removeEventListener(type: K, listener: (this: TextTrackList, ev: TextTrackListEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; [index: number]: TextTrack; + [Symbol.iterator](): ArrayIterator; } declare var TextTrackList: { @@ -37053,6 +37164,7 @@ interface TouchList { */ item(index: number): Touch | null; [index: number]: Touch; + [Symbol.iterator](): ArrayIterator; } declare var TouchList: { @@ -37489,6 +37601,10 @@ declare var URLPattern: { new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; }; + +interface URLSearchParamsIterator extends IteratorObject { + [Symbol.iterator](): URLSearchParamsIterator; +} /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -37545,11 +37661,18 @@ interface URLSearchParams { sort(): void; toString(): string; forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void; + [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; + /** Returns an array of key, value pairs for every entry in the search params. */ + entries(): URLSearchParamsIterator<[string, string]>; + /** Returns a list of keys in the search params. */ + keys(): URLSearchParamsIterator; + /** Returns a list of values in the search params. */ + values(): URLSearchParamsIterator; } declare var URLSearchParams: { prototype: URLSearchParams; - new(init?: string[][] | Record | string | URLSearchParams): URLSearchParams; + new(init?: Iterable | Record | string): URLSearchParams; }; /** @@ -38162,7 +38285,7 @@ declare var ViewTransition: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ViewTransitionTypeSet) */ -interface ViewTransitionTypeSet { +interface ViewTransitionTypeSet extends Set { forEach(callbackfn: (value: string, key: string, parent: ViewTransitionTypeSet) => void, thisArg?: any): void; } @@ -38399,7 +38522,7 @@ interface WEBGL_draw_buffers { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL) */ - drawBuffersWEBGL(buffers: GLenum[]): void; + drawBuffersWEBGL(buffers: Iterable): void; readonly COLOR_ATTACHMENT0_WEBGL: 0x8CE0; readonly COLOR_ATTACHMENT1_WEBGL: 0x8CE1; readonly COLOR_ATTACHMENT2_WEBGL: 0x8CE2; @@ -38467,25 +38590,25 @@ interface WEBGL_multi_draw { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) */ - multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: number, countsList: Int32Array | GLsizei[], countsOffset: number, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: number, drawcount: GLsizei): void; + multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; /** * The **`WEBGL_multi_draw.multiDrawArraysWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawArrays() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) */ - multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: number, countsList: Int32Array | GLsizei[], countsOffset: number, drawcount: GLsizei): void; + multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, drawcount: GLsizei): void; /** * The **`WEBGL_multi_draw.multiDrawElementsInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElementsInstanced() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) */ - multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: number, drawcount: GLsizei): void; + multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; /** * The **`WEBGL_multi_draw.multiDrawElementsWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElements() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) */ - multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; + multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; } /** @@ -38494,7 +38617,7 @@ interface WEBGL_multi_draw { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures) */ -interface WGSLLanguageFeatures { +interface WGSLLanguageFeatures extends ReadonlySet { forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void; } @@ -39182,11 +39305,11 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: number): void; + clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List | Iterable, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: number): void; + clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List | Iterable, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: number): void; + clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List | Iterable, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clientWaitSync) */ clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexImage3D) */ @@ -39220,7 +39343,7 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawArraysInstanced) */ drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */ - drawBuffers(buffers: GLenum[]): void; + drawBuffers(buffers: Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawElementsInstanced) */ drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawRangeElements) */ @@ -39238,7 +39361,7 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniformBlockParameter) */ getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */ - getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any; + getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable, pname: GLenum): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getBufferSubData) */ getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: number, length?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getFragDataLocation) */ @@ -39260,11 +39383,11 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformBlockIndex) */ getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */ - getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null; + getUniformIndices(program: WebGLProgram, uniformNames: Iterable): GLuint[] | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */ - invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void; + invalidateFramebuffer(target: GLenum, attachments: Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */ - invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; + invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isQuery) */ isQuery(query: WebGLQuery | null): GLboolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isSampler) */ @@ -39301,47 +39424,47 @@ interface WebGL2RenderingContextBase { texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */ - transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void; + transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable, bufferMode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformBlockBinding) */ uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribDivisor) */ vertexAttribDivisor(index: GLuint, divisor: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4iv(index: GLuint, values: Int32List): void; + vertexAttribI4iv(index: GLuint, values: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4uiv(index: GLuint, values: Uint32List): void; + vertexAttribI4uiv(index: GLuint, values: Uint32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribIPointer) */ vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/waitSync) */ @@ -39641,27 +39764,27 @@ interface WebGL2RenderingContextOverloads { texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform1fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform1iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform2fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform2iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform3fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform3iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform4fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform4iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; } /** @@ -40353,19 +40476,19 @@ interface WebGLRenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib1f(index: GLuint, x: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib1fv(index: GLuint, values: Float32List): void; + vertexAttrib1fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib2fv(index: GLuint, values: Float32List): void; + vertexAttrib2fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib3fv(index: GLuint, values: Float32List): void; + vertexAttrib3fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib4fv(index: GLuint, values: Float32List): void; + vertexAttrib4fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) */ vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/viewport) */ @@ -40688,27 +40811,27 @@ interface WebGLRenderingContextOverloads { texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform1fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform1iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform2fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform2iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform3fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform3iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform4fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform4iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List | Iterable): void; } /** @@ -40918,7 +41041,7 @@ interface WebSocket extends EventTarget { declare var WebSocket: { prototype: WebSocket; - new(url: string | URL, protocols?: string | string[]): WebSocket; + new(url: string | URL, protocols?: string | Iterable): WebSocket; readonly CONNECTING: 0; readonly OPEN: 1; readonly CLOSING: 2; @@ -42514,7 +42637,7 @@ declare namespace WebAssembly { var Exception: { prototype: Exception; - new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + new(exceptionTag: Tag, payload: Iterable, options?: ExceptionOptions): Exception; }; /** @@ -42851,7 +42974,7 @@ interface Console { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */ - table(tabularData?: any, properties?: string[]): void; + table(tabularData?: any, properties?: Iterable): void; /** * The **`console.time()`** static method starts a timer you can use to track how long an operation takes. You give each timer a unique name, and may have up to 10,000 timers running on a given page. When you call console.timeEnd() with the same name, the browser will output the time, in milliseconds, that elapsed since the timer was started. * @@ -42925,7 +43048,7 @@ interface FileCallback { } interface FileSystemEntriesCallback { - (entries: FileSystemEntry[]): void; + (entries: Iterable): void; } interface FileSystemEntryCallback { @@ -42945,7 +43068,7 @@ interface IdleRequestCallback { } interface IntersectionObserverCallback { - (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void; + (entries: Iterable, observer: IntersectionObserver): void; } interface LockGrantedCallback { @@ -42957,7 +43080,7 @@ interface MediaSessionActionHandler { } interface MutationCallback { - (mutations: MutationRecord[], observer: MutationObserver): void; + (mutations: Iterable, observer: MutationObserver): void; } interface NavigationInterceptHandler { @@ -43009,11 +43132,11 @@ interface RemotePlaybackAvailabilityCallback { } interface ReportingObserverCallback { - (reports: Report[], observer: ReportingObserver): void; + (reports: Iterable, observer: ReportingObserver): void; } interface ResizeObserverCallback { - (entries: ResizeObserverEntry[], observer: ResizeObserver): void; + (entries: Iterable, observer: ResizeObserver): void; } interface SchedulerPostTaskCallback { @@ -44458,652 +44581,3 @@ type WebTransportErrorSource = "session" | "stream"; type WorkerType = "classic" | "module"; type WriteCommandType = "seek" | "truncate" | "write"; type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text"; - - -///////////////////////////// -/// Window Iterable APIs -///////////////////////////// - -interface AudioParam { - /** - * The **`setValueCurveAtTime()`** method of the AudioParam interface schedules the parameter's value to change following a curve defined by a list of values. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime) - */ - setValueCurveAtTime(values: Iterable, startTime: number, duration: number): AudioParam; -} - -interface AudioParamMap extends ReadonlyMap { -} - -interface BaseAudioContext { - /** - * The **`createIIRFilter()`** method of the BaseAudioContext interface creates an IIRFilterNode, which represents a general infinite impulse response (IIR) filter which can be configured to serve as various types of filter. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createIIRFilter) - */ - createIIRFilter(feedforward: Iterable, feedback: Iterable): IIRFilterNode; - /** - * The **`createPeriodicWave()`** method of the BaseAudioContext interface is used to create a PeriodicWave. This wave is used to define a periodic waveform that can be used to shape the output of an OscillatorNode. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createPeriodicWave) - */ - createPeriodicWave(real: Iterable, imag: Iterable, constraints?: PeriodicWaveConstraints): PeriodicWave; -} - -interface CSSKeyframesRule { - [Symbol.iterator](): ArrayIterator; -} - -interface CSSNumericArray { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, CSSNumericValue]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface CSSRuleList { - [Symbol.iterator](): ArrayIterator; -} - -interface CSSStyleDeclaration { - [Symbol.iterator](): ArrayIterator; -} - -interface CSSTransformValue { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, CSSTransformComponent]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface CSSUnparsedValue { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, CSSUnparsedSegment]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface Cache { - /** - * The **`addAll()`** method of the Cache interface takes an array of URLs, retrieves them, and adds the resulting response objects to the given cache. The request objects created during retrieval become keys to the stored response operations. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) - */ - addAll(requests: Iterable): Promise; -} - -interface CanvasPath { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect) */ - roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable): void; -} - -interface CanvasPathDrawingStyles { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash) */ - setLineDash(segments: Iterable): void; -} - -interface CookieStoreManager { - /** - * The **`subscribe()`** method of the CookieStoreManager interface subscribes a ServiceWorkerRegistration to cookie change events. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/subscribe) - */ - subscribe(subscriptions: Iterable): Promise; - /** - * The **`unsubscribe()`** method of the CookieStoreManager interface stops the ServiceWorkerRegistration from receiving previously subscribed events. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/unsubscribe) - */ - unsubscribe(subscriptions: Iterable): Promise; -} - -interface CustomStateSet extends Set { -} - -interface DOMRectList { - [Symbol.iterator](): ArrayIterator; -} - -interface DOMStringList { - [Symbol.iterator](): ArrayIterator; -} - -interface DOMTokenList { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, string]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface DataTransferItemList { - [Symbol.iterator](): ArrayIterator; -} - -interface EventCounts extends ReadonlyMap { -} - -interface FileList { - [Symbol.iterator](): ArrayIterator; -} - -interface FontFaceSet extends Set { -} - -interface FormDataIterator extends IteratorObject { - [Symbol.iterator](): FormDataIterator; -} - -interface FormData { - [Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>; - /** Returns an array of key, value pairs for every entry in the list. */ - entries(): FormDataIterator<[string, FormDataEntryValue]>; - /** Returns a list of keys in the list. */ - keys(): FormDataIterator; - /** Returns a list of values in the list. */ - values(): FormDataIterator; -} - -interface GPUBindingCommandsMixin { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ - setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; -} - -interface GPUCommandEncoder { - /** - * The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) - */ - copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; - /** - * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) - */ - copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable): void; - /** - * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) - */ - copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; -} - -interface GPUQueue { - /** - * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) - */ - copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable): void; - /** - * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) - */ - submit(commandBuffers: Iterable): void; - /** - * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) - */ - writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable): void; -} - -interface GPURenderPassEncoder { - /** - * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) - */ - executeBundles(bundles: Iterable): void; - /** - * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property). - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) - */ - setBlendConstant(color: Iterable): void; -} - -interface GPUSupportedFeatures extends ReadonlySet { -} - -interface HTMLAllCollection { - [Symbol.iterator](): ArrayIterator; -} - -interface HTMLCollectionBase { - [Symbol.iterator](): ArrayIterator; -} - -interface HTMLCollectionOf { - [Symbol.iterator](): ArrayIterator; -} - -interface HTMLFormElement { - [Symbol.iterator](): ArrayIterator; -} - -interface HTMLSelectElement { - [Symbol.iterator](): ArrayIterator; -} - -interface HeadersIterator extends IteratorObject { - [Symbol.iterator](): HeadersIterator; -} - -interface Headers { - [Symbol.iterator](): HeadersIterator<[string, string]>; - /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ - entries(): HeadersIterator<[string, string]>; - /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */ - keys(): HeadersIterator; - /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ - values(): HeadersIterator; -} - -interface Highlight extends Set { -} - -interface HighlightRegistry extends Map { -} - -interface IDBDatabase { - /** - * The **`transaction`** method of the IDBDatabase interface immediately returns a transaction object (IDBTransaction) containing the IDBTransaction.objectStore method, which you can use to access your object store. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction) - */ - transaction(storeNames: string | Iterable, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction; -} - -interface IDBObjectStore { - /** - * The **`createIndex()`** method of the IDBObjectStore interface creates and returns a new IDBIndex object in the connected database. It creates a new field/column defining a new data point for each database record to contain. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex) - */ - createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; -} - -interface ImageTrackList { - [Symbol.iterator](): ArrayIterator; -} - -interface MIDIInputMap extends ReadonlyMap { -} - -interface MIDIOutput { - /** - * The **`send()`** method of the MIDIOutput interface queues messages for the corresponding MIDI port. The message can be sent immediately, or with an optional timestamp to delay sending. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutput/send) - */ - send(data: Iterable, timestamp?: DOMHighResTimeStamp): void; -} - -interface MIDIOutputMap extends ReadonlyMap { -} - -interface MediaKeyStatusMapIterator extends IteratorObject { - [Symbol.iterator](): MediaKeyStatusMapIterator; -} - -interface MediaKeyStatusMap { - [Symbol.iterator](): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>; - entries(): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>; - keys(): MediaKeyStatusMapIterator; - values(): MediaKeyStatusMapIterator; -} - -interface MediaList { - [Symbol.iterator](): ArrayIterator; -} - -interface MessageEvent { - /** @deprecated */ - initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; -} - -interface MimeTypeArray { - [Symbol.iterator](): ArrayIterator; -} - -interface NamedNodeMap { - [Symbol.iterator](): ArrayIterator; -} - -interface Navigator { - /** - * The **`requestMediaKeySystemAccess()`** method of the Navigator interface returns a Promise which delivers a MediaKeySystemAccess object that can be used to access a particular media key system, which can in turn be used to create keys for decrypting a media stream. - * Available only in secure contexts. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/requestMediaKeySystemAccess) - */ - requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable): Promise; - /** - * The **`vibrate()`** method of the Navigator interface pulses the vibration hardware on the device, if such hardware exists. If the device doesn't support vibration, this method has no effect. If a vibration pattern is already in progress when this method is called, the previous pattern is halted and the new one begins instead. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/vibrate) - */ - vibrate(pattern: Iterable): boolean; -} - -interface NodeList { - [Symbol.iterator](): ArrayIterator; - /** Returns an array of key, value pairs for every entry in the list. */ - entries(): ArrayIterator<[number, Node]>; - /** Returns an list of keys in the list. */ - keys(): ArrayIterator; - /** Returns an list of values in the list. */ - values(): ArrayIterator; -} - -interface NodeListOf { - [Symbol.iterator](): ArrayIterator; - /** Returns an array of key, value pairs for every entry in the list. */ - entries(): ArrayIterator<[number, TNode]>; - /** Returns an list of keys in the list. */ - keys(): ArrayIterator; - /** Returns an list of values in the list. */ - values(): ArrayIterator; -} - -interface Plugin { - [Symbol.iterator](): ArrayIterator; -} - -interface PluginArray { - [Symbol.iterator](): ArrayIterator; -} - -interface RTCRtpTransceiver { - /** - * The **`setCodecPreferences()`** method of the RTCRtpTransceiver interface is used to set the codecs that the transceiver allows for decoding received data, in order of decreasing preference. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpTransceiver/setCodecPreferences) - */ - setCodecPreferences(codecs: Iterable): void; -} - -interface RTCStatsReport extends ReadonlyMap { -} - -interface SVGLengthList { - [Symbol.iterator](): ArrayIterator; -} - -interface SVGNumberList { - [Symbol.iterator](): ArrayIterator; -} - -interface SVGPointList { - [Symbol.iterator](): ArrayIterator; -} - -interface SVGStringList { - [Symbol.iterator](): ArrayIterator; -} - -interface SVGTransformList { - [Symbol.iterator](): ArrayIterator; -} - -interface SourceBufferList { - [Symbol.iterator](): ArrayIterator; -} - -interface SpeechRecognitionResult { - [Symbol.iterator](): ArrayIterator; -} - -interface SpeechRecognitionResultList { - [Symbol.iterator](): ArrayIterator; -} - -interface StylePropertyMapReadOnlyIterator extends IteratorObject { - [Symbol.iterator](): StylePropertyMapReadOnlyIterator; -} - -interface StylePropertyMapReadOnly { - [Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, Iterable]>; - entries(): StylePropertyMapReadOnlyIterator<[string, Iterable]>; - keys(): StylePropertyMapReadOnlyIterator; - values(): StylePropertyMapReadOnlyIterator>; -} - -interface StyleSheetList { - [Symbol.iterator](): ArrayIterator; -} - -interface SubtleCrypto { - /** - * The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) - */ - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable): Promise; - /** - * The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms). - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) - */ - generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; - generateKey(algorithm: "X25519" | { name: "X25519" }, extractable: boolean, keyUsages: ReadonlyArray<"deriveBits" | "deriveKey">): Promise; - generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; - generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; - generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable): Promise; - /** - * The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) - */ - importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray): Promise; - importKey(format: Exclude, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; - /** - * The **`unwrapKey()`** method of the SubtleCrypto interface "unwraps" a key. This means that it takes as its input a key that has been exported and then encrypted (also called "wrapped"). It decrypts the key and then imports it, returning a CryptoKey object that can be used in the Web Crypto API. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) - */ - unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; -} - -interface TextTrackCueList { - [Symbol.iterator](): ArrayIterator; -} - -interface TextTrackList { - [Symbol.iterator](): ArrayIterator; -} - -interface TouchList { - [Symbol.iterator](): ArrayIterator; -} - -interface URLSearchParamsIterator extends IteratorObject { - [Symbol.iterator](): URLSearchParamsIterator; -} - -interface URLSearchParams { - [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; - /** Returns an array of key, value pairs for every entry in the search params. */ - entries(): URLSearchParamsIterator<[string, string]>; - /** Returns a list of keys in the search params. */ - keys(): URLSearchParamsIterator; - /** Returns a list of values in the search params. */ - values(): URLSearchParamsIterator; -} - -interface ViewTransitionTypeSet extends Set { -} - -interface WEBGL_draw_buffers { - /** - * The **`WEBGL_draw_buffers.drawBuffersWEBGL()`** method is part of the WebGL API and allows you to define the draw buffers to which all fragment colors are written. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL) - */ - drawBuffersWEBGL(buffers: Iterable): void; -} - -interface WEBGL_multi_draw { - /** - * The **`WEBGL_multi_draw.multiDrawArraysInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawArraysInstanced() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) - */ - multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; - /** - * The **`WEBGL_multi_draw.multiDrawArraysWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawArrays() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) - */ - multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, drawcount: GLsizei): void; - /** - * The **`WEBGL_multi_draw.multiDrawElementsInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElementsInstanced() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) - */ - multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; - /** - * The **`WEBGL_multi_draw.multiDrawElementsWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElements() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) - */ - multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; -} - -interface WGSLLanguageFeatures extends ReadonlySet { -} - -interface WebGL2RenderingContextBase { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */ - drawBuffers(buffers: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */ - getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable, pname: GLenum): any; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */ - getUniformIndices(program: WebGLProgram, uniformNames: Iterable): GLuint[] | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */ - invalidateFramebuffer(target: GLenum, attachments: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */ - invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */ - transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable, bufferMode: GLenum): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform1uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform2uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform3uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform4uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4iv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4uiv(index: GLuint, values: Iterable): void; -} - -interface WebGL2RenderingContextOverloads { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; -} - -interface WebGLRenderingContextBase { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib1fv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib2fv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib3fv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib4fv(index: GLuint, values: Iterable): void; -} - -interface WebGLRenderingContextOverloads { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; -} - - -///////////////////////////// -/// Window Async Iterable APIs -///////////////////////////// - -interface FileSystemDirectoryHandleAsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator; -} - -interface FileSystemDirectoryHandle { - [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; - entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; - keys(): FileSystemDirectoryHandleAsyncIterator; - values(): FileSystemDirectoryHandleAsyncIterator; -} - -interface ReadableStreamAsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): ReadableStreamAsyncIterator; -} - -interface ReadableStream { - [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; - values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; -} diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index 01aaca4c2..0c934781e 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -1339,7 +1339,7 @@ declare var AbortSignal: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */ - any(signals: AbortSignal[]): AbortSignal; + any(signals: Iterable): AbortSignal; /** * The **`AbortSignal.timeout()`** static method returns an AbortSignal that will automatically abort after a specified time. * @@ -1413,7 +1413,7 @@ interface Blob { declare var Blob: { prototype: Blob; - new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; + new(blobParts?: Iterable, options?: BlobPropertyBag): Blob; }; interface Body { @@ -1709,6 +1709,10 @@ interface CSSNumericArray { readonly length: number; forEach(callbackfn: (value: CSSNumericValue, key: number, parent: CSSNumericArray) => void, thisArg?: any): void; [index: number]: CSSNumericValue; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSNumericValue]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var CSSNumericArray: { @@ -2006,11 +2010,15 @@ interface CSSTransformValue extends CSSStyleValue { toMatrix(): DOMMatrix; forEach(callbackfn: (value: CSSTransformComponent, key: number, parent: CSSTransformValue) => void, thisArg?: any): void; [index: number]: CSSTransformComponent; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSTransformComponent]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var CSSTransformValue: { prototype: CSSTransformValue; - new(transforms: CSSTransformComponent[]): CSSTransformValue; + new(transforms: Iterable): CSSTransformValue; }; /** @@ -2083,11 +2091,15 @@ interface CSSUnparsedValue extends CSSStyleValue { readonly length: number; forEach(callbackfn: (value: CSSUnparsedSegment, key: number, parent: CSSUnparsedValue) => void, thisArg?: any): void; [index: number]: CSSUnparsedSegment; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSUnparsedSegment]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var CSSUnparsedValue: { prototype: CSSUnparsedValue; - new(members: CSSUnparsedSegment[]): CSSUnparsedValue; + new(members: Iterable): CSSUnparsedValue; }; /** @@ -2133,7 +2145,7 @@ interface Cache { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) */ - addAll(requests: RequestInfo[]): Promise; + addAll(requests: Iterable): Promise; /** * The **`delete()`** method of the Cache interface finds the Cache entry whose key is the request, and if found, deletes the Cache entry and returns a Promise that resolves to true. If no Cache entry is found, it resolves to false. * @@ -2326,7 +2338,7 @@ interface CanvasPath { /** [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; + roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable): void; } interface CanvasPathDrawingStyles { @@ -2343,7 +2355,7 @@ interface CanvasPathDrawingStyles { /** [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; + setLineDash(segments: Iterable): void; } /** @@ -2635,13 +2647,13 @@ interface CookieStoreManager { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/subscribe) */ - subscribe(subscriptions: CookieStoreGetOptions[]): Promise; + subscribe(subscriptions: Iterable): Promise; /** * The **`unsubscribe()`** method of the CookieStoreManager interface stops the ServiceWorkerRegistration from receiving previously subscribed events. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/unsubscribe) */ - unsubscribe(subscriptions: CookieStoreGetOptions[]): Promise; + unsubscribe(subscriptions: Iterable): Promise; } declare var CookieStoreManager: { @@ -2969,7 +2981,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | Iterable): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3154,7 +3166,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | Iterable): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * @@ -3475,6 +3487,7 @@ interface DOMStringList { */ item(index: number): string | null; [index: number]: string; + [Symbol.iterator](): ArrayIterator; } declare var DOMStringList: { @@ -4055,7 +4068,7 @@ interface File extends Blob { declare var File: { prototype: File; - new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File; + new(fileBits: Iterable, fileName: string, options?: FilePropertyBag): File; }; /** @@ -4077,6 +4090,7 @@ interface FileList { */ item(index: number): File | null; [index: number]: File; + [Symbol.iterator](): ArrayIterator; } declare var FileList: { @@ -4177,6 +4191,10 @@ declare var FileReader: { readonly DONE: 2; }; + +interface FileSystemDirectoryHandleAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator; +} /** * The **`FileSystemDirectoryHandle`** interface of the File System API provides a handle to a file system directory. * Available only in secure contexts. @@ -4209,6 +4227,10 @@ interface FileSystemDirectoryHandle extends FileSystemHandle { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/resolve) */ resolve(possibleDescendant: FileSystemHandle): Promise; + [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; + entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; + keys(): FileSystemDirectoryHandleAsyncIterator; + values(): FileSystemDirectoryHandleAsyncIterator; } declare var FileSystemDirectoryHandle: { @@ -4415,7 +4437,7 @@ interface FontFaceSetEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */ -interface FontFaceSet extends EventTarget { +interface FontFaceSet extends EventTarget, Set { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */ onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */ @@ -4482,6 +4504,10 @@ interface FontFaceSource { readonly fonts: FontFaceSet; } + +interface FormDataIterator extends IteratorObject { + [Symbol.iterator](): FormDataIterator; +} /** * The **`FormData`** interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using the fetch(), XMLHttpRequest.send() or navigator.sendBeacon() methods. It uses the same format a form would use if the encoding type were set to "multipart/form-data". * @@ -4529,6 +4555,13 @@ interface FormData { 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; + [Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>; + /** Returns an array of key, value pairs for every entry in the list. */ + entries(): FormDataIterator<[string, FormDataEntryValue]>; + /** Returns a list of keys in the list. */ + keys(): FormDataIterator; + /** Returns a list of values in the list. */ + values(): FormDataIterator; } declare var FormData: { @@ -4692,7 +4725,7 @@ declare var GPUBindGroupLayout: { interface GPUBindingCommandsMixin { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ - setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void; + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void; } @@ -4847,19 +4880,19 @@ interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ - copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ - copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void; + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ - copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer. * @@ -5348,7 +5381,7 @@ interface GPUQueue extends GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ - copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void; + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`onSubmittedWorkDone()`** method of the GPUQueue interface returns a Promise that resolves when all the work submitted to the GPU via this GPUQueue at the point the method is called has been processed. * @@ -5360,7 +5393,7 @@ interface GPUQueue extends GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ - submit(commandBuffers: GPUCommandBuffer[]): void; + submit(commandBuffers: Iterable): void; /** * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer. * @@ -5372,7 +5405,7 @@ interface GPUQueue extends GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ - writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void; + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D | Iterable): void; } declare var GPUQueue: { @@ -5461,13 +5494,13 @@ interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommands * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ - executeBundles(bundles: GPURenderBundle[]): void; + executeBundles(bundles: Iterable): void; /** * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ - setBlendConstant(color: GPUColor): void; + setBlendConstant(color: GPUColor | Iterable): void; /** * The **`setScissorRect()`** method of the GPURenderPassEncoder interface sets the scissor rectangle used during the rasterization stage. After transformation into viewport coordinates any fragments that fall outside the scissor rectangle will be discarded. * @@ -5547,7 +5580,7 @@ declare var GPUShaderModule: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures) */ -interface GPUSupportedFeatures { +interface GPUSupportedFeatures extends ReadonlySet { forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void; } @@ -5761,6 +5794,10 @@ interface GenericTransformStream { readonly writable: WritableStream; } + +interface HeadersIterator extends IteratorObject { + [Symbol.iterator](): HeadersIterator; +} /** * The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing headers from the list of the request's headers. * @@ -5804,11 +5841,18 @@ interface Headers { */ set(name: string, value: string): void; forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void; + [Symbol.iterator](): HeadersIterator<[string, string]>; + /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ + entries(): HeadersIterator<[string, string]>; + /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */ + keys(): HeadersIterator; + /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ + values(): HeadersIterator; } declare var Headers: { prototype: Headers; - new(init?: HeadersInit): Headers; + new(init?: HeadersInit | Iterable<[string, string]>): Headers; }; /** @@ -5964,7 +6008,7 @@ interface IDBDatabase extends EventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction) */ - transaction(storeNames: string | string[], mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction; + transaction(storeNames: string | Iterable, 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; @@ -6224,7 +6268,7 @@ interface IDBObjectStore { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex) */ - createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex; + createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; /** * The **`delete()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, deletes the specified record or records. * @@ -6718,7 +6762,7 @@ interface MessageEvent extends Event { */ readonly source: MessageEventSource | null; /** @deprecated */ - initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void; + initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; } declare var MessageEvent: { @@ -8021,6 +8065,10 @@ declare var ReadableByteStreamController: { new(): ReadableByteStreamController; }; + +interface ReadableStreamAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): ReadableStreamAsyncIterator; +} /** * The **`ReadableStream`** interface of the Streams API 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. * @@ -8065,6 +8113,8 @@ interface ReadableStream { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */ tee(): [ReadableStream, ReadableStream]; + [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; } declare var ReadableStream: { @@ -8828,6 +8878,10 @@ declare var StorageManager: { new(): StorageManager; }; + +interface StylePropertyMapReadOnlyIterator extends IteratorObject { + [Symbol.iterator](): StylePropertyMapReadOnlyIterator; +} /** * The **`StylePropertyMapReadOnly`** interface of the CSS Typed Object Model API provides a read-only representation of a CSS declaration block that is an alternative to CSSStyleDeclaration. Retrieve an instance of this interface using Element.computedStyleMap(). * @@ -8859,6 +8913,10 @@ interface StylePropertyMapReadOnly { */ has(property: string): boolean; forEach(callbackfn: (value: CSSStyleValue[], key: string, parent: StylePropertyMapReadOnly) => void, thisArg?: any): void; + [Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, CSSStyleValue[]]>; + entries(): StylePropertyMapReadOnlyIterator<[string, CSSStyleValue[]]>; + keys(): StylePropertyMapReadOnlyIterator; + values(): StylePropertyMapReadOnlyIterator; } declare var StylePropertyMapReadOnly: { @@ -8890,7 +8948,7 @@ interface SubtleCrypto { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; + deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`digest()`** method of the SubtleCrypto interface generates a digest of the given data, using the specified hash function. A digest is a short fixed-length value derived from some variable-length input. Cryptographic digests should exhibit collision-resistance, meaning that it's hard to come up with two different inputs that have the same digest value. * @@ -8920,14 +8978,14 @@ interface SubtleCrypto { generateKey(algorithm: "X25519" | { name: "X25519" }, extractable: boolean, keyUsages: ReadonlyArray<"deriveBits" | "deriveKey">): Promise; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; - generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; + generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */ importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray): Promise; - importKey(format: Exclude, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; + importKey(format: Exclude, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`sign()`** method of the SubtleCrypto interface generates a digital signature. * @@ -8939,7 +8997,7 @@ interface SubtleCrypto { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */ - unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; + unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`verify()`** method of the SubtleCrypto interface verifies a digital signature. * @@ -9029,7 +9087,7 @@ declare var TaskSignal: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static) */ - any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal; + any(signals: Iterable, init?: TaskSignalAnyInit): TaskSignal; }; /** @@ -9471,6 +9529,10 @@ declare var URLPattern: { new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; }; + +interface URLSearchParamsIterator extends IteratorObject { + [Symbol.iterator](): URLSearchParamsIterator; +} /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -9527,11 +9589,18 @@ interface URLSearchParams { sort(): void; toString(): string; forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void; + [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; + /** Returns an array of key, value pairs for every entry in the search params. */ + entries(): URLSearchParamsIterator<[string, string]>; + /** Returns a list of keys in the search params. */ + keys(): URLSearchParamsIterator; + /** Returns a list of values in the search params. */ + values(): URLSearchParamsIterator; } declare var URLSearchParams: { prototype: URLSearchParams; - new(init?: string[][] | Record | string | URLSearchParams): URLSearchParams; + new(init?: Iterable | Record | string): URLSearchParams; }; /** @@ -9694,7 +9763,7 @@ interface WEBGL_draw_buffers { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL) */ - drawBuffersWEBGL(buffers: GLenum[]): void; + drawBuffersWEBGL(buffers: Iterable): void; readonly COLOR_ATTACHMENT0_WEBGL: 0x8CE0; readonly COLOR_ATTACHMENT1_WEBGL: 0x8CE1; readonly COLOR_ATTACHMENT2_WEBGL: 0x8CE2; @@ -9762,25 +9831,25 @@ interface WEBGL_multi_draw { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) */ - multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: number, countsList: Int32Array | GLsizei[], countsOffset: number, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: number, drawcount: GLsizei): void; + multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; /** * The **`WEBGL_multi_draw.multiDrawArraysWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawArrays() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) */ - multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: number, countsList: Int32Array | GLsizei[], countsOffset: number, drawcount: GLsizei): void; + multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, drawcount: GLsizei): void; /** * The **`WEBGL_multi_draw.multiDrawElementsInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElementsInstanced() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) */ - multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: number, drawcount: GLsizei): void; + multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; /** * The **`WEBGL_multi_draw.multiDrawElementsWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElements() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) */ - multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; + multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; } /** @@ -9789,7 +9858,7 @@ interface WEBGL_multi_draw { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures) */ -interface WGSLLanguageFeatures { +interface WGSLLanguageFeatures extends ReadonlySet { forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void; } @@ -10390,11 +10459,11 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: number): void; + clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List | Iterable, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: number): void; + clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List | Iterable, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: number): void; + clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List | Iterable, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clientWaitSync) */ clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexImage3D) */ @@ -10428,7 +10497,7 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawArraysInstanced) */ drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */ - drawBuffers(buffers: GLenum[]): void; + drawBuffers(buffers: Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawElementsInstanced) */ drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawRangeElements) */ @@ -10446,7 +10515,7 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniformBlockParameter) */ getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */ - getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any; + getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable, pname: GLenum): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getBufferSubData) */ getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: number, length?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getFragDataLocation) */ @@ -10468,11 +10537,11 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformBlockIndex) */ getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */ - getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null; + getUniformIndices(program: WebGLProgram, uniformNames: Iterable): GLuint[] | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */ - invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void; + invalidateFramebuffer(target: GLenum, attachments: Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */ - invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; + invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isQuery) */ isQuery(query: WebGLQuery | null): GLboolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isSampler) */ @@ -10509,47 +10578,47 @@ interface WebGL2RenderingContextBase { texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */ - transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void; + transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable, bufferMode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformBlockBinding) */ uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribDivisor) */ vertexAttribDivisor(index: GLuint, divisor: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4iv(index: GLuint, values: Int32List): void; + vertexAttribI4iv(index: GLuint, values: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4uiv(index: GLuint, values: Uint32List): void; + vertexAttribI4uiv(index: GLuint, values: Uint32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribIPointer) */ vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/waitSync) */ @@ -10849,27 +10918,27 @@ interface WebGL2RenderingContextOverloads { texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform1fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform1iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform2fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform2iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform3fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform3iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform4fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform4iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; } /** @@ -11559,19 +11628,19 @@ interface WebGLRenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib1f(index: GLuint, x: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib1fv(index: GLuint, values: Float32List): void; + vertexAttrib1fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib2fv(index: GLuint, values: Float32List): void; + vertexAttrib2fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib3fv(index: GLuint, values: Float32List): void; + vertexAttrib3fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib4fv(index: GLuint, values: Float32List): void; + vertexAttrib4fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) */ vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/viewport) */ @@ -11894,27 +11963,27 @@ interface WebGLRenderingContextOverloads { texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform1fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform1iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform2fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform2iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform3fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform3iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform4fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform4iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List | Iterable): void; } /** @@ -12124,7 +12193,7 @@ interface WebSocket extends EventTarget { declare var WebSocket: { prototype: WebSocket; - new(url: string | URL, protocols?: string | string[]): WebSocket; + new(url: string | URL, protocols?: string | Iterable): WebSocket; readonly CONNECTING: 0; readonly OPEN: 1; readonly CLOSING: 2; @@ -12702,7 +12771,7 @@ declare namespace WebAssembly { var Exception: { prototype: Exception; - new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + new(exceptionTag: Tag, payload: Iterable, options?: ExceptionOptions): Exception; }; /** @@ -13039,7 +13108,7 @@ interface Console { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */ - table(tabularData?: any, properties?: string[]): void; + table(tabularData?: any, properties?: Iterable): void; /** * The **`console.time()`** static method starts a timer you can use to track how long an operation takes. You give each timer a unique name, and may have up to 10,000 timers running on a given page. When you call console.timeEnd() with the same name, the browser will output the time, in milliseconds, that elapsed since the timer was started. * @@ -13093,7 +13162,7 @@ interface QueuingStrategySize { } interface ReportingObserverCallback { - (reports: Report[], observer: ReportingObserver): void; + (reports: Iterable, observer: ReportingObserver): void; } interface SchedulerPostTaskCallback { @@ -13473,417 +13542,3 @@ type WebTransportCongestionControl = "default" | "low-latency" | "throughput"; type WebTransportErrorSource = "session" | "stream"; type WorkerType = "classic" | "module"; type WriteCommandType = "seek" | "truncate" | "write"; - - -///////////////////////////// -/// ServiceWorker Iterable APIs -///////////////////////////// - -interface CSSNumericArray { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, CSSNumericValue]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface CSSTransformValue { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, CSSTransformComponent]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface CSSUnparsedValue { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, CSSUnparsedSegment]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface Cache { - /** - * The **`addAll()`** method of the Cache interface takes an array of URLs, retrieves them, and adds the resulting response objects to the given cache. The request objects created during retrieval become keys to the stored response operations. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) - */ - addAll(requests: Iterable): Promise; -} - -interface CanvasPath { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect) */ - roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable): void; -} - -interface CanvasPathDrawingStyles { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash) */ - setLineDash(segments: Iterable): void; -} - -interface CookieStoreManager { - /** - * The **`subscribe()`** method of the CookieStoreManager interface subscribes a ServiceWorkerRegistration to cookie change events. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/subscribe) - */ - subscribe(subscriptions: Iterable): Promise; - /** - * The **`unsubscribe()`** method of the CookieStoreManager interface stops the ServiceWorkerRegistration from receiving previously subscribed events. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/unsubscribe) - */ - unsubscribe(subscriptions: Iterable): Promise; -} - -interface DOMStringList { - [Symbol.iterator](): ArrayIterator; -} - -interface FileList { - [Symbol.iterator](): ArrayIterator; -} - -interface FontFaceSet extends Set { -} - -interface FormDataIterator extends IteratorObject { - [Symbol.iterator](): FormDataIterator; -} - -interface FormData { - [Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>; - /** Returns an array of key, value pairs for every entry in the list. */ - entries(): FormDataIterator<[string, FormDataEntryValue]>; - /** Returns a list of keys in the list. */ - keys(): FormDataIterator; - /** Returns a list of values in the list. */ - values(): FormDataIterator; -} - -interface GPUBindingCommandsMixin { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ - setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; -} - -interface GPUCommandEncoder { - /** - * The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) - */ - copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; - /** - * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) - */ - copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable): void; - /** - * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) - */ - copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; -} - -interface GPUQueue { - /** - * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) - */ - copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable): void; - /** - * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) - */ - submit(commandBuffers: Iterable): void; - /** - * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) - */ - writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable): void; -} - -interface GPURenderPassEncoder { - /** - * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) - */ - executeBundles(bundles: Iterable): void; - /** - * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property). - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) - */ - setBlendConstant(color: Iterable): void; -} - -interface GPUSupportedFeatures extends ReadonlySet { -} - -interface HeadersIterator extends IteratorObject { - [Symbol.iterator](): HeadersIterator; -} - -interface Headers { - [Symbol.iterator](): HeadersIterator<[string, string]>; - /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ - entries(): HeadersIterator<[string, string]>; - /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */ - keys(): HeadersIterator; - /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ - values(): HeadersIterator; -} - -interface IDBDatabase { - /** - * The **`transaction`** method of the IDBDatabase interface immediately returns a transaction object (IDBTransaction) containing the IDBTransaction.objectStore method, which you can use to access your object store. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction) - */ - transaction(storeNames: string | Iterable, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction; -} - -interface IDBObjectStore { - /** - * The **`createIndex()`** method of the IDBObjectStore interface creates and returns a new IDBIndex object in the connected database. It creates a new field/column defining a new data point for each database record to contain. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex) - */ - createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; -} - -interface MessageEvent { - /** @deprecated */ - initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; -} - -interface StylePropertyMapReadOnlyIterator extends IteratorObject { - [Symbol.iterator](): StylePropertyMapReadOnlyIterator; -} - -interface StylePropertyMapReadOnly { - [Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, Iterable]>; - entries(): StylePropertyMapReadOnlyIterator<[string, Iterable]>; - keys(): StylePropertyMapReadOnlyIterator; - values(): StylePropertyMapReadOnlyIterator>; -} - -interface SubtleCrypto { - /** - * The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) - */ - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable): Promise; - /** - * The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms). - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) - */ - generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; - generateKey(algorithm: "X25519" | { name: "X25519" }, extractable: boolean, keyUsages: ReadonlyArray<"deriveBits" | "deriveKey">): Promise; - generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; - generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; - generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable): Promise; - /** - * The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) - */ - importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray): Promise; - importKey(format: Exclude, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; - /** - * The **`unwrapKey()`** method of the SubtleCrypto interface "unwraps" a key. This means that it takes as its input a key that has been exported and then encrypted (also called "wrapped"). It decrypts the key and then imports it, returning a CryptoKey object that can be used in the Web Crypto API. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) - */ - unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; -} - -interface URLSearchParamsIterator extends IteratorObject { - [Symbol.iterator](): URLSearchParamsIterator; -} - -interface URLSearchParams { - [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; - /** Returns an array of key, value pairs for every entry in the search params. */ - entries(): URLSearchParamsIterator<[string, string]>; - /** Returns a list of keys in the search params. */ - keys(): URLSearchParamsIterator; - /** Returns a list of values in the search params. */ - values(): URLSearchParamsIterator; -} - -interface WEBGL_draw_buffers { - /** - * The **`WEBGL_draw_buffers.drawBuffersWEBGL()`** method is part of the WebGL API and allows you to define the draw buffers to which all fragment colors are written. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL) - */ - drawBuffersWEBGL(buffers: Iterable): void; -} - -interface WEBGL_multi_draw { - /** - * The **`WEBGL_multi_draw.multiDrawArraysInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawArraysInstanced() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) - */ - multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; - /** - * The **`WEBGL_multi_draw.multiDrawArraysWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawArrays() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) - */ - multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, drawcount: GLsizei): void; - /** - * The **`WEBGL_multi_draw.multiDrawElementsInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElementsInstanced() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) - */ - multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; - /** - * The **`WEBGL_multi_draw.multiDrawElementsWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElements() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) - */ - multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; -} - -interface WGSLLanguageFeatures extends ReadonlySet { -} - -interface WebGL2RenderingContextBase { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */ - drawBuffers(buffers: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */ - getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable, pname: GLenum): any; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */ - getUniformIndices(program: WebGLProgram, uniformNames: Iterable): GLuint[] | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */ - invalidateFramebuffer(target: GLenum, attachments: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */ - invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */ - transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable, bufferMode: GLenum): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform1uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform2uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform3uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform4uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4iv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4uiv(index: GLuint, values: Iterable): void; -} - -interface WebGL2RenderingContextOverloads { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; -} - -interface WebGLRenderingContextBase { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib1fv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib2fv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib3fv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib4fv(index: GLuint, values: Iterable): void; -} - -interface WebGLRenderingContextOverloads { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; -} - - -///////////////////////////// -/// ServiceWorker Async Iterable APIs -///////////////////////////// - -interface FileSystemDirectoryHandleAsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator; -} - -interface FileSystemDirectoryHandle { - [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; - entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; - keys(): FileSystemDirectoryHandleAsyncIterator; - values(): FileSystemDirectoryHandleAsyncIterator; -} - -interface ReadableStreamAsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): ReadableStreamAsyncIterator; -} - -interface ReadableStream { - [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; - values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; -} diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index 69dd5b56a..05c38b599 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -1275,7 +1275,7 @@ declare var AbortSignal: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */ - any(signals: AbortSignal[]): AbortSignal; + any(signals: Iterable): AbortSignal; /** * The **`AbortSignal.timeout()`** static method returns an AbortSignal that will automatically abort after a specified time. * @@ -1349,7 +1349,7 @@ interface Blob { declare var Blob: { prototype: Blob; - new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; + new(blobParts?: Iterable, options?: BlobPropertyBag): Blob; }; interface Body { @@ -1645,6 +1645,10 @@ interface CSSNumericArray { readonly length: number; forEach(callbackfn: (value: CSSNumericValue, key: number, parent: CSSNumericArray) => void, thisArg?: any): void; [index: number]: CSSNumericValue; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSNumericValue]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var CSSNumericArray: { @@ -1942,11 +1946,15 @@ interface CSSTransformValue extends CSSStyleValue { toMatrix(): DOMMatrix; forEach(callbackfn: (value: CSSTransformComponent, key: number, parent: CSSTransformValue) => void, thisArg?: any): void; [index: number]: CSSTransformComponent; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSTransformComponent]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var CSSTransformValue: { prototype: CSSTransformValue; - new(transforms: CSSTransformComponent[]): CSSTransformValue; + new(transforms: Iterable): CSSTransformValue; }; /** @@ -2019,11 +2027,15 @@ interface CSSUnparsedValue extends CSSStyleValue { readonly length: number; forEach(callbackfn: (value: CSSUnparsedSegment, key: number, parent: CSSUnparsedValue) => void, thisArg?: any): void; [index: number]: CSSUnparsedSegment; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSUnparsedSegment]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var CSSUnparsedValue: { prototype: CSSUnparsedValue; - new(members: CSSUnparsedSegment[]): CSSUnparsedValue; + new(members: Iterable): CSSUnparsedValue; }; /** @@ -2069,7 +2081,7 @@ interface Cache { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) */ - addAll(requests: RequestInfo[]): Promise; + addAll(requests: Iterable): Promise; /** * The **`delete()`** method of the Cache interface finds the Cache entry whose key is the request, and if found, deletes the Cache entry and returns a Promise that resolves to true. If no Cache entry is found, it resolves to false. * @@ -2262,7 +2274,7 @@ interface CanvasPath { /** [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; + roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable): void; } interface CanvasPathDrawingStyles { @@ -2279,7 +2291,7 @@ interface CanvasPathDrawingStyles { /** [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; + setLineDash(segments: Iterable): void; } /** @@ -2750,7 +2762,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | Iterable): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -2935,7 +2947,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | Iterable): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * @@ -3256,6 +3268,7 @@ interface DOMStringList { */ item(index: number): string | null; [index: number]: string; + [Symbol.iterator](): ArrayIterator; } declare var DOMStringList: { @@ -3700,7 +3713,7 @@ interface File extends Blob { declare var File: { prototype: File; - new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File; + new(fileBits: Iterable, fileName: string, options?: FilePropertyBag): File; }; /** @@ -3722,6 +3735,7 @@ interface FileList { */ item(index: number): File | null; [index: number]: File; + [Symbol.iterator](): ArrayIterator; } declare var FileList: { @@ -3860,6 +3874,10 @@ declare var FileReaderSync: { new(): FileReaderSync; }; + +interface FileSystemDirectoryHandleAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator; +} /** * The **`FileSystemDirectoryHandle`** interface of the File System API provides a handle to a file system directory. * Available only in secure contexts. @@ -3892,6 +3910,10 @@ interface FileSystemDirectoryHandle extends FileSystemHandle { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/resolve) */ resolve(possibleDescendant: FileSystemHandle): Promise; + [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; + entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; + keys(): FileSystemDirectoryHandleAsyncIterator; + values(): FileSystemDirectoryHandleAsyncIterator; } declare var FileSystemDirectoryHandle: { @@ -4098,7 +4120,7 @@ interface FontFaceSetEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */ -interface FontFaceSet extends EventTarget { +interface FontFaceSet extends EventTarget, Set { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */ onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */ @@ -4165,6 +4187,10 @@ interface FontFaceSource { readonly fonts: FontFaceSet; } + +interface FormDataIterator extends IteratorObject { + [Symbol.iterator](): FormDataIterator; +} /** * The **`FormData`** interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using the fetch(), XMLHttpRequest.send() or navigator.sendBeacon() methods. It uses the same format a form would use if the encoding type were set to "multipart/form-data". * @@ -4212,6 +4238,13 @@ interface FormData { 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; + [Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>; + /** Returns an array of key, value pairs for every entry in the list. */ + entries(): FormDataIterator<[string, FormDataEntryValue]>; + /** Returns a list of keys in the list. */ + keys(): FormDataIterator; + /** Returns a list of values in the list. */ + values(): FormDataIterator; } declare var FormData: { @@ -4375,7 +4408,7 @@ declare var GPUBindGroupLayout: { interface GPUBindingCommandsMixin { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ - setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void; + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void; } @@ -4530,19 +4563,19 @@ interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ - copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ - copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void; + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ - copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer. * @@ -5031,7 +5064,7 @@ interface GPUQueue extends GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ - copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void; + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`onSubmittedWorkDone()`** method of the GPUQueue interface returns a Promise that resolves when all the work submitted to the GPU via this GPUQueue at the point the method is called has been processed. * @@ -5043,7 +5076,7 @@ interface GPUQueue extends GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ - submit(commandBuffers: GPUCommandBuffer[]): void; + submit(commandBuffers: Iterable): void; /** * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer. * @@ -5055,7 +5088,7 @@ interface GPUQueue extends GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ - writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void; + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D | Iterable): void; } declare var GPUQueue: { @@ -5144,13 +5177,13 @@ interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommands * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ - executeBundles(bundles: GPURenderBundle[]): void; + executeBundles(bundles: Iterable): void; /** * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ - setBlendConstant(color: GPUColor): void; + setBlendConstant(color: GPUColor | Iterable): void; /** * The **`setScissorRect()`** method of the GPURenderPassEncoder interface sets the scissor rectangle used during the rasterization stage. After transformation into viewport coordinates any fragments that fall outside the scissor rectangle will be discarded. * @@ -5230,7 +5263,7 @@ declare var GPUShaderModule: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures) */ -interface GPUSupportedFeatures { +interface GPUSupportedFeatures extends ReadonlySet { forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void; } @@ -5444,6 +5477,10 @@ interface GenericTransformStream { readonly writable: WritableStream; } + +interface HeadersIterator extends IteratorObject { + [Symbol.iterator](): HeadersIterator; +} /** * The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing headers from the list of the request's headers. * @@ -5487,11 +5524,18 @@ interface Headers { */ set(name: string, value: string): void; forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void; + [Symbol.iterator](): HeadersIterator<[string, string]>; + /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ + entries(): HeadersIterator<[string, string]>; + /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */ + keys(): HeadersIterator; + /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ + values(): HeadersIterator; } declare var Headers: { prototype: Headers; - new(init?: HeadersInit): Headers; + new(init?: HeadersInit | Iterable<[string, string]>): Headers; }; /** @@ -5647,7 +5691,7 @@ interface IDBDatabase extends EventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction) */ - transaction(storeNames: string | string[], mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction; + transaction(storeNames: string | Iterable, 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; @@ -5907,7 +5951,7 @@ interface IDBObjectStore { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex) */ - createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex; + createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; /** * The **`delete()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, deletes the specified record or records. * @@ -6401,7 +6445,7 @@ interface MessageEvent extends Event { */ readonly source: MessageEventSource | null; /** @deprecated */ - initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void; + initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; } declare var MessageEvent: { @@ -7604,6 +7648,10 @@ declare var ReadableByteStreamController: { new(): ReadableByteStreamController; }; + +interface ReadableStreamAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): ReadableStreamAsyncIterator; +} /** * The **`ReadableStream`** interface of the Streams API 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. * @@ -7648,6 +7696,8 @@ interface ReadableStream { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */ tee(): [ReadableStream, ReadableStream]; + [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; } declare var ReadableStream: { @@ -8359,6 +8409,10 @@ declare var StorageManager: { new(): StorageManager; }; + +interface StylePropertyMapReadOnlyIterator extends IteratorObject { + [Symbol.iterator](): StylePropertyMapReadOnlyIterator; +} /** * The **`StylePropertyMapReadOnly`** interface of the CSS Typed Object Model API provides a read-only representation of a CSS declaration block that is an alternative to CSSStyleDeclaration. Retrieve an instance of this interface using Element.computedStyleMap(). * @@ -8390,6 +8444,10 @@ interface StylePropertyMapReadOnly { */ has(property: string): boolean; forEach(callbackfn: (value: CSSStyleValue[], key: string, parent: StylePropertyMapReadOnly) => void, thisArg?: any): void; + [Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, CSSStyleValue[]]>; + entries(): StylePropertyMapReadOnlyIterator<[string, CSSStyleValue[]]>; + keys(): StylePropertyMapReadOnlyIterator; + values(): StylePropertyMapReadOnlyIterator; } declare var StylePropertyMapReadOnly: { @@ -8421,7 +8479,7 @@ interface SubtleCrypto { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; + deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`digest()`** method of the SubtleCrypto interface generates a digest of the given data, using the specified hash function. A digest is a short fixed-length value derived from some variable-length input. Cryptographic digests should exhibit collision-resistance, meaning that it's hard to come up with two different inputs that have the same digest value. * @@ -8451,14 +8509,14 @@ interface SubtleCrypto { generateKey(algorithm: "X25519" | { name: "X25519" }, extractable: boolean, keyUsages: ReadonlyArray<"deriveBits" | "deriveKey">): Promise; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; - generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; + generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */ importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray): Promise; - importKey(format: Exclude, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; + importKey(format: Exclude, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`sign()`** method of the SubtleCrypto interface generates a digital signature. * @@ -8470,7 +8528,7 @@ interface SubtleCrypto { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */ - unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; + unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`verify()`** method of the SubtleCrypto interface verifies a digital signature. * @@ -8560,7 +8618,7 @@ declare var TaskSignal: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static) */ - any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal; + any(signals: Iterable, init?: TaskSignalAnyInit): TaskSignal; }; /** @@ -9014,6 +9072,10 @@ declare var URLPattern: { new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; }; + +interface URLSearchParamsIterator extends IteratorObject { + [Symbol.iterator](): URLSearchParamsIterator; +} /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -9070,11 +9132,18 @@ interface URLSearchParams { sort(): void; toString(): string; forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void; + [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; + /** Returns an array of key, value pairs for every entry in the search params. */ + entries(): URLSearchParamsIterator<[string, string]>; + /** Returns a list of keys in the search params. */ + keys(): URLSearchParamsIterator; + /** Returns a list of values in the search params. */ + values(): URLSearchParamsIterator; } declare var URLSearchParams: { prototype: URLSearchParams; - new(init?: string[][] | Record | string | URLSearchParams): URLSearchParams; + new(init?: Iterable | Record | string): URLSearchParams; }; /** @@ -9237,7 +9306,7 @@ interface WEBGL_draw_buffers { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL) */ - drawBuffersWEBGL(buffers: GLenum[]): void; + drawBuffersWEBGL(buffers: Iterable): void; readonly COLOR_ATTACHMENT0_WEBGL: 0x8CE0; readonly COLOR_ATTACHMENT1_WEBGL: 0x8CE1; readonly COLOR_ATTACHMENT2_WEBGL: 0x8CE2; @@ -9305,25 +9374,25 @@ interface WEBGL_multi_draw { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) */ - multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: number, countsList: Int32Array | GLsizei[], countsOffset: number, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: number, drawcount: GLsizei): void; + multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; /** * The **`WEBGL_multi_draw.multiDrawArraysWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawArrays() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) */ - multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: number, countsList: Int32Array | GLsizei[], countsOffset: number, drawcount: GLsizei): void; + multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, drawcount: GLsizei): void; /** * The **`WEBGL_multi_draw.multiDrawElementsInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElementsInstanced() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) */ - multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: number, drawcount: GLsizei): void; + multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; /** * The **`WEBGL_multi_draw.multiDrawElementsWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElements() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) */ - multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; + multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; } /** @@ -9332,7 +9401,7 @@ interface WEBGL_multi_draw { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures) */ -interface WGSLLanguageFeatures { +interface WGSLLanguageFeatures extends ReadonlySet { forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void; } @@ -9933,11 +10002,11 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: number): void; + clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List | Iterable, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: number): void; + clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List | Iterable, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: number): void; + clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List | Iterable, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clientWaitSync) */ clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexImage3D) */ @@ -9971,7 +10040,7 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawArraysInstanced) */ drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */ - drawBuffers(buffers: GLenum[]): void; + drawBuffers(buffers: Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawElementsInstanced) */ drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawRangeElements) */ @@ -9989,7 +10058,7 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniformBlockParameter) */ getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */ - getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any; + getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable, pname: GLenum): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getBufferSubData) */ getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: number, length?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getFragDataLocation) */ @@ -10011,11 +10080,11 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformBlockIndex) */ getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */ - getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null; + getUniformIndices(program: WebGLProgram, uniformNames: Iterable): GLuint[] | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */ - invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void; + invalidateFramebuffer(target: GLenum, attachments: Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */ - invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; + invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isQuery) */ isQuery(query: WebGLQuery | null): GLboolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isSampler) */ @@ -10052,47 +10121,47 @@ interface WebGL2RenderingContextBase { texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */ - transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void; + transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable, bufferMode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformBlockBinding) */ uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribDivisor) */ vertexAttribDivisor(index: GLuint, divisor: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4iv(index: GLuint, values: Int32List): void; + vertexAttribI4iv(index: GLuint, values: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4uiv(index: GLuint, values: Uint32List): void; + vertexAttribI4uiv(index: GLuint, values: Uint32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribIPointer) */ vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/waitSync) */ @@ -10392,27 +10461,27 @@ interface WebGL2RenderingContextOverloads { texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform1fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform1iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform2fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform2iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform3fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform3iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform4fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform4iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; } /** @@ -11102,19 +11171,19 @@ interface WebGLRenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib1f(index: GLuint, x: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib1fv(index: GLuint, values: Float32List): void; + vertexAttrib1fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib2fv(index: GLuint, values: Float32List): void; + vertexAttrib2fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib3fv(index: GLuint, values: Float32List): void; + vertexAttrib3fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib4fv(index: GLuint, values: Float32List): void; + vertexAttrib4fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) */ vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/viewport) */ @@ -11437,27 +11506,27 @@ interface WebGLRenderingContextOverloads { texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform1fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform1iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform2fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform2iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform3fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform3iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform4fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform4iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List | Iterable): void; } /** @@ -11667,7 +11736,7 @@ interface WebSocket extends EventTarget { declare var WebSocket: { prototype: WebSocket; - new(url: string | URL, protocols?: string | string[]): WebSocket; + new(url: string | URL, protocols?: string | Iterable): WebSocket; readonly CONNECTING: 0; readonly OPEN: 1; readonly CLOSING: 2; @@ -12428,7 +12497,7 @@ declare namespace WebAssembly { var Exception: { prototype: Exception; - new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + new(exceptionTag: Tag, payload: Iterable, options?: ExceptionOptions): Exception; }; /** @@ -12765,7 +12834,7 @@ interface Console { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */ - table(tabularData?: any, properties?: string[]): void; + table(tabularData?: any, properties?: Iterable): void; /** * The **`console.time()`** static method starts a timer you can use to track how long an operation takes. You give each timer a unique name, and may have up to 10,000 timers running on a given page. When you call console.timeEnd() with the same name, the browser will output the time, in milliseconds, that elapsed since the timer was started. * @@ -12819,7 +12888,7 @@ interface QueuingStrategySize { } interface ReportingObserverCallback { - (reports: Report[], observer: ReportingObserver): void; + (reports: Iterable, observer: ReportingObserver): void; } interface SchedulerPostTaskCallback { @@ -13159,402 +13228,3 @@ type WebTransportErrorSource = "session" | "stream"; type WorkerType = "classic" | "module"; type WriteCommandType = "seek" | "truncate" | "write"; type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text"; - - -///////////////////////////// -/// SharedWorker Iterable APIs -///////////////////////////// - -interface CSSNumericArray { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, CSSNumericValue]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface CSSTransformValue { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, CSSTransformComponent]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface CSSUnparsedValue { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, CSSUnparsedSegment]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface Cache { - /** - * The **`addAll()`** method of the Cache interface takes an array of URLs, retrieves them, and adds the resulting response objects to the given cache. The request objects created during retrieval become keys to the stored response operations. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) - */ - addAll(requests: Iterable): Promise; -} - -interface CanvasPath { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect) */ - roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable): void; -} - -interface CanvasPathDrawingStyles { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash) */ - setLineDash(segments: Iterable): void; -} - -interface DOMStringList { - [Symbol.iterator](): ArrayIterator; -} - -interface FileList { - [Symbol.iterator](): ArrayIterator; -} - -interface FontFaceSet extends Set { -} - -interface FormDataIterator extends IteratorObject { - [Symbol.iterator](): FormDataIterator; -} - -interface FormData { - [Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>; - /** Returns an array of key, value pairs for every entry in the list. */ - entries(): FormDataIterator<[string, FormDataEntryValue]>; - /** Returns a list of keys in the list. */ - keys(): FormDataIterator; - /** Returns a list of values in the list. */ - values(): FormDataIterator; -} - -interface GPUBindingCommandsMixin { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ - setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; -} - -interface GPUCommandEncoder { - /** - * The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) - */ - copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; - /** - * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) - */ - copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable): void; - /** - * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) - */ - copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; -} - -interface GPUQueue { - /** - * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) - */ - copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable): void; - /** - * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) - */ - submit(commandBuffers: Iterable): void; - /** - * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) - */ - writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable): void; -} - -interface GPURenderPassEncoder { - /** - * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) - */ - executeBundles(bundles: Iterable): void; - /** - * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property). - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) - */ - setBlendConstant(color: Iterable): void; -} - -interface GPUSupportedFeatures extends ReadonlySet { -} - -interface HeadersIterator extends IteratorObject { - [Symbol.iterator](): HeadersIterator; -} - -interface Headers { - [Symbol.iterator](): HeadersIterator<[string, string]>; - /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ - entries(): HeadersIterator<[string, string]>; - /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */ - keys(): HeadersIterator; - /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ - values(): HeadersIterator; -} - -interface IDBDatabase { - /** - * The **`transaction`** method of the IDBDatabase interface immediately returns a transaction object (IDBTransaction) containing the IDBTransaction.objectStore method, which you can use to access your object store. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction) - */ - transaction(storeNames: string | Iterable, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction; -} - -interface IDBObjectStore { - /** - * The **`createIndex()`** method of the IDBObjectStore interface creates and returns a new IDBIndex object in the connected database. It creates a new field/column defining a new data point for each database record to contain. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex) - */ - createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; -} - -interface MessageEvent { - /** @deprecated */ - initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; -} - -interface StylePropertyMapReadOnlyIterator extends IteratorObject { - [Symbol.iterator](): StylePropertyMapReadOnlyIterator; -} - -interface StylePropertyMapReadOnly { - [Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, Iterable]>; - entries(): StylePropertyMapReadOnlyIterator<[string, Iterable]>; - keys(): StylePropertyMapReadOnlyIterator; - values(): StylePropertyMapReadOnlyIterator>; -} - -interface SubtleCrypto { - /** - * The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) - */ - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable): Promise; - /** - * The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms). - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) - */ - generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; - generateKey(algorithm: "X25519" | { name: "X25519" }, extractable: boolean, keyUsages: ReadonlyArray<"deriveBits" | "deriveKey">): Promise; - generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; - generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; - generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable): Promise; - /** - * The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) - */ - importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray): Promise; - importKey(format: Exclude, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; - /** - * The **`unwrapKey()`** method of the SubtleCrypto interface "unwraps" a key. This means that it takes as its input a key that has been exported and then encrypted (also called "wrapped"). It decrypts the key and then imports it, returning a CryptoKey object that can be used in the Web Crypto API. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) - */ - unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; -} - -interface URLSearchParamsIterator extends IteratorObject { - [Symbol.iterator](): URLSearchParamsIterator; -} - -interface URLSearchParams { - [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; - /** Returns an array of key, value pairs for every entry in the search params. */ - entries(): URLSearchParamsIterator<[string, string]>; - /** Returns a list of keys in the search params. */ - keys(): URLSearchParamsIterator; - /** Returns a list of values in the search params. */ - values(): URLSearchParamsIterator; -} - -interface WEBGL_draw_buffers { - /** - * The **`WEBGL_draw_buffers.drawBuffersWEBGL()`** method is part of the WebGL API and allows you to define the draw buffers to which all fragment colors are written. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL) - */ - drawBuffersWEBGL(buffers: Iterable): void; -} - -interface WEBGL_multi_draw { - /** - * The **`WEBGL_multi_draw.multiDrawArraysInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawArraysInstanced() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) - */ - multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; - /** - * The **`WEBGL_multi_draw.multiDrawArraysWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawArrays() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) - */ - multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, drawcount: GLsizei): void; - /** - * The **`WEBGL_multi_draw.multiDrawElementsInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElementsInstanced() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) - */ - multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; - /** - * The **`WEBGL_multi_draw.multiDrawElementsWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElements() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) - */ - multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; -} - -interface WGSLLanguageFeatures extends ReadonlySet { -} - -interface WebGL2RenderingContextBase { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */ - drawBuffers(buffers: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */ - getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable, pname: GLenum): any; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */ - getUniformIndices(program: WebGLProgram, uniformNames: Iterable): GLuint[] | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */ - invalidateFramebuffer(target: GLenum, attachments: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */ - invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */ - transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable, bufferMode: GLenum): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform1uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform2uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform3uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform4uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4iv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4uiv(index: GLuint, values: Iterable): void; -} - -interface WebGL2RenderingContextOverloads { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; -} - -interface WebGLRenderingContextBase { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib1fv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib2fv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib3fv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib4fv(index: GLuint, values: Iterable): void; -} - -interface WebGLRenderingContextOverloads { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; -} - - -///////////////////////////// -/// SharedWorker Async Iterable APIs -///////////////////////////// - -interface FileSystemDirectoryHandleAsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator; -} - -interface FileSystemDirectoryHandle { - [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; - entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; - keys(): FileSystemDirectoryHandleAsyncIterator; - values(): FileSystemDirectoryHandleAsyncIterator; -} - -interface ReadableStreamAsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): ReadableStreamAsyncIterator; -} - -interface ReadableStream { - [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; - values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; -} diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index e1de8865b..b023b657d 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -1594,7 +1594,7 @@ declare var AbortSignal: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */ - any(signals: AbortSignal[]): AbortSignal; + any(signals: Iterable): AbortSignal; /** * The **`AbortSignal.timeout()`** static method returns an AbortSignal that will automatically abort after a specified time. * @@ -1892,7 +1892,7 @@ interface Blob { declare var Blob: { prototype: Blob; - new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; + new(blobParts?: Iterable, options?: BlobPropertyBag): Blob; }; interface Body { @@ -2188,6 +2188,10 @@ interface CSSNumericArray { readonly length: number; forEach(callbackfn: (value: CSSNumericValue, key: number, parent: CSSNumericArray) => void, thisArg?: any): void; [index: number]: CSSNumericValue; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSNumericValue]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var CSSNumericArray: { @@ -2485,11 +2489,15 @@ interface CSSTransformValue extends CSSStyleValue { toMatrix(): DOMMatrix; forEach(callbackfn: (value: CSSTransformComponent, key: number, parent: CSSTransformValue) => void, thisArg?: any): void; [index: number]: CSSTransformComponent; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSTransformComponent]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var CSSTransformValue: { prototype: CSSTransformValue; - new(transforms: CSSTransformComponent[]): CSSTransformValue; + new(transforms: Iterable): CSSTransformValue; }; /** @@ -2562,11 +2570,15 @@ interface CSSUnparsedValue extends CSSStyleValue { readonly length: number; forEach(callbackfn: (value: CSSUnparsedSegment, key: number, parent: CSSUnparsedValue) => void, thisArg?: any): void; [index: number]: CSSUnparsedSegment; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSUnparsedSegment]>; + keys(): ArrayIterator; + values(): ArrayIterator; } declare var CSSUnparsedValue: { prototype: CSSUnparsedValue; - new(members: CSSUnparsedSegment[]): CSSUnparsedValue; + new(members: Iterable): CSSUnparsedValue; }; /** @@ -2612,7 +2624,7 @@ interface Cache { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) */ - addAll(requests: RequestInfo[]): Promise; + addAll(requests: Iterable): Promise; /** * The **`delete()`** method of the Cache interface finds the Cache entry whose key is the request, and if found, deletes the Cache entry and returns a Promise that resolves to true. If no Cache entry is found, it resolves to false. * @@ -2805,7 +2817,7 @@ interface CanvasPath { /** [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; + roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable): void; } interface CanvasPathDrawingStyles { @@ -2822,7 +2834,7 @@ interface CanvasPathDrawingStyles { /** [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; + setLineDash(segments: Iterable): void; } /** @@ -3114,13 +3126,13 @@ interface CookieStoreManager { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/subscribe) */ - subscribe(subscriptions: CookieStoreGetOptions[]): Promise; + subscribe(subscriptions: Iterable): Promise; /** * The **`unsubscribe()`** method of the CookieStoreManager interface stops the ServiceWorkerRegistration from receiving previously subscribed events. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/unsubscribe) */ - unsubscribe(subscriptions: CookieStoreGetOptions[]): Promise; + unsubscribe(subscriptions: Iterable): Promise; } declare var CookieStoreManager: { @@ -3448,7 +3460,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { declare var DOMMatrix: { prototype: DOMMatrix; - new(init?: string | number[]): DOMMatrix; + new(init?: string | Iterable): DOMMatrix; /** * The **`fromFloat32Array()`** static method of the DOMMatrix interface creates a new DOMMatrix object given an array of single-precision (32-bit) floating-point values. * @@ -3633,7 +3645,7 @@ interface DOMMatrixReadOnly { declare var DOMMatrixReadOnly: { prototype: DOMMatrixReadOnly; - new(init?: string | number[]): DOMMatrixReadOnly; + new(init?: string | Iterable): DOMMatrixReadOnly; /** * The **`fromFloat32Array()`** static method of the DOMMatrixReadOnly interface creates a new DOMMatrixReadOnly object given an array of single-precision (32-bit) floating-point values. * @@ -3954,6 +3966,7 @@ interface DOMStringList { */ item(index: number): string | null; [index: number]: string; + [Symbol.iterator](): ArrayIterator; } declare var DOMStringList: { @@ -4664,7 +4677,7 @@ interface File extends Blob { declare var File: { prototype: File; - new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File; + new(fileBits: Iterable, fileName: string, options?: FilePropertyBag): File; }; /** @@ -4686,6 +4699,7 @@ interface FileList { */ item(index: number): File | null; [index: number]: File; + [Symbol.iterator](): ArrayIterator; } declare var FileList: { @@ -4824,6 +4838,10 @@ declare var FileReaderSync: { new(): FileReaderSync; }; + +interface FileSystemDirectoryHandleAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator; +} /** * The **`FileSystemDirectoryHandle`** interface of the File System API provides a handle to a file system directory. * Available only in secure contexts. @@ -4856,6 +4874,10 @@ interface FileSystemDirectoryHandle extends FileSystemHandle { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/resolve) */ resolve(possibleDescendant: FileSystemHandle): Promise; + [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; + entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; + keys(): FileSystemDirectoryHandleAsyncIterator; + values(): FileSystemDirectoryHandleAsyncIterator; } declare var FileSystemDirectoryHandle: { @@ -5118,7 +5140,7 @@ interface FontFaceSetEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */ -interface FontFaceSet extends EventTarget { +interface FontFaceSet extends EventTarget, Set { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */ onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */ @@ -5185,6 +5207,10 @@ interface FontFaceSource { readonly fonts: FontFaceSet; } + +interface FormDataIterator extends IteratorObject { + [Symbol.iterator](): FormDataIterator; +} /** * The **`FormData`** interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using the fetch(), XMLHttpRequest.send() or navigator.sendBeacon() methods. It uses the same format a form would use if the encoding type were set to "multipart/form-data". * @@ -5232,6 +5258,13 @@ interface FormData { 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; + [Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>; + /** Returns an array of key, value pairs for every entry in the list. */ + entries(): FormDataIterator<[string, FormDataEntryValue]>; + /** Returns a list of keys in the list. */ + keys(): FormDataIterator; + /** Returns a list of values in the list. */ + values(): FormDataIterator; } declare var FormData: { @@ -5395,7 +5428,7 @@ declare var GPUBindGroupLayout: { interface GPUBindingCommandsMixin { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ - setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void; + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void; } @@ -5550,19 +5583,19 @@ interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ - copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ - copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void; + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ - copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer. * @@ -6051,7 +6084,7 @@ interface GPUQueue extends GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ - copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void; + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D | Iterable): void; /** * The **`onSubmittedWorkDone()`** method of the GPUQueue interface returns a Promise that resolves when all the work submitted to the GPU via this GPUQueue at the point the method is called has been processed. * @@ -6063,7 +6096,7 @@ interface GPUQueue extends GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ - submit(commandBuffers: GPUCommandBuffer[]): void; + submit(commandBuffers: Iterable): void; /** * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer. * @@ -6075,7 +6108,7 @@ interface GPUQueue extends GPUObjectBase { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ - writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void; + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D | Iterable): void; } declare var GPUQueue: { @@ -6164,13 +6197,13 @@ interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommands * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ - executeBundles(bundles: GPURenderBundle[]): void; + executeBundles(bundles: Iterable): void; /** * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property). * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ - setBlendConstant(color: GPUColor): void; + setBlendConstant(color: GPUColor | Iterable): void; /** * The **`setScissorRect()`** method of the GPURenderPassEncoder interface sets the scissor rectangle used during the rasterization stage. After transformation into viewport coordinates any fragments that fall outside the scissor rectangle will be discarded. * @@ -6250,7 +6283,7 @@ declare var GPUShaderModule: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures) */ -interface GPUSupportedFeatures { +interface GPUSupportedFeatures extends ReadonlySet { forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void; } @@ -6464,6 +6497,10 @@ interface GenericTransformStream { readonly writable: WritableStream; } + +interface HeadersIterator extends IteratorObject { + [Symbol.iterator](): HeadersIterator; +} /** * The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing headers from the list of the request's headers. * @@ -6507,11 +6544,18 @@ interface Headers { */ set(name: string, value: string): void; forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void; + [Symbol.iterator](): HeadersIterator<[string, string]>; + /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ + entries(): HeadersIterator<[string, string]>; + /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */ + keys(): HeadersIterator; + /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ + values(): HeadersIterator; } declare var Headers: { prototype: Headers; - new(init?: HeadersInit): Headers; + new(init?: HeadersInit | Iterable<[string, string]>): Headers; }; /** @@ -6667,7 +6711,7 @@ interface IDBDatabase extends EventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction) */ - transaction(storeNames: string | string[], mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction; + transaction(storeNames: string | Iterable, 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; @@ -6927,7 +6971,7 @@ interface IDBObjectStore { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex) */ - createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex; + createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; /** * The **`delete()`** method of the IDBObjectStore interface returns an IDBRequest object, and, in a separate thread, deletes the specified record or records. * @@ -7399,6 +7443,7 @@ interface ImageTrackList { */ readonly selectedTrack: ImageTrack | null; [index: number]: ImageTrack; + [Symbol.iterator](): ArrayIterator; } declare var ImageTrackList: { @@ -7592,7 +7637,7 @@ interface MessageEvent extends Event { */ readonly source: MessageEventSource | null; /** @deprecated */ - initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void; + initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; } declare var MessageEvent: { @@ -9144,6 +9189,10 @@ declare var ReadableByteStreamController: { new(): ReadableByteStreamController; }; + +interface ReadableStreamAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): ReadableStreamAsyncIterator; +} /** * The **`ReadableStream`** interface of the Streams API 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. * @@ -9188,6 +9237,8 @@ interface ReadableStream { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */ tee(): [ReadableStream, ReadableStream]; + [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; } declare var ReadableStream: { @@ -9986,6 +10037,10 @@ declare var StorageManager: { new(): StorageManager; }; + +interface StylePropertyMapReadOnlyIterator extends IteratorObject { + [Symbol.iterator](): StylePropertyMapReadOnlyIterator; +} /** * The **`StylePropertyMapReadOnly`** interface of the CSS Typed Object Model API provides a read-only representation of a CSS declaration block that is an alternative to CSSStyleDeclaration. Retrieve an instance of this interface using Element.computedStyleMap(). * @@ -10017,6 +10072,10 @@ interface StylePropertyMapReadOnly { */ has(property: string): boolean; forEach(callbackfn: (value: CSSStyleValue[], key: string, parent: StylePropertyMapReadOnly) => void, thisArg?: any): void; + [Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, CSSStyleValue[]]>; + entries(): StylePropertyMapReadOnlyIterator<[string, CSSStyleValue[]]>; + keys(): StylePropertyMapReadOnlyIterator; + values(): StylePropertyMapReadOnlyIterator; } declare var StylePropertyMapReadOnly: { @@ -10048,7 +10107,7 @@ interface SubtleCrypto { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; + deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`digest()`** method of the SubtleCrypto interface generates a digest of the given data, using the specified hash function. A digest is a short fixed-length value derived from some variable-length input. Cryptographic digests should exhibit collision-resistance, meaning that it's hard to come up with two different inputs that have the same digest value. * @@ -10078,14 +10137,14 @@ interface SubtleCrypto { generateKey(algorithm: "X25519" | { name: "X25519" }, extractable: boolean, keyUsages: ReadonlyArray<"deriveBits" | "deriveKey">): Promise; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; - generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; + generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */ importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray): Promise; - importKey(format: Exclude, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; + importKey(format: Exclude, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`sign()`** method of the SubtleCrypto interface generates a digital signature. * @@ -10097,7 +10156,7 @@ interface SubtleCrypto { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */ - unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; + unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; /** * The **`verify()`** method of the SubtleCrypto interface verifies a digital signature. * @@ -10187,7 +10246,7 @@ declare var TaskSignal: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TaskSignal/any_static) */ - any(signals: AbortSignal[], init?: TaskSignalAnyInit): TaskSignal; + any(signals: Iterable, init?: TaskSignalAnyInit): TaskSignal; }; /** @@ -10641,6 +10700,10 @@ declare var URLPattern: { new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; }; + +interface URLSearchParamsIterator extends IteratorObject { + [Symbol.iterator](): URLSearchParamsIterator; +} /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -10697,11 +10760,18 @@ interface URLSearchParams { sort(): void; toString(): string; forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void; + [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; + /** Returns an array of key, value pairs for every entry in the search params. */ + entries(): URLSearchParamsIterator<[string, string]>; + /** Returns a list of keys in the search params. */ + keys(): URLSearchParamsIterator; + /** Returns a list of values in the search params. */ + values(): URLSearchParamsIterator; } declare var URLSearchParams: { prototype: URLSearchParams; - new(init?: string[][] | Record | string | URLSearchParams): URLSearchParams; + new(init?: Iterable | Record | string): URLSearchParams; }; /** @@ -11149,7 +11219,7 @@ interface WEBGL_draw_buffers { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL) */ - drawBuffersWEBGL(buffers: GLenum[]): void; + drawBuffersWEBGL(buffers: Iterable): void; readonly COLOR_ATTACHMENT0_WEBGL: 0x8CE0; readonly COLOR_ATTACHMENT1_WEBGL: 0x8CE1; readonly COLOR_ATTACHMENT2_WEBGL: 0x8CE2; @@ -11217,25 +11287,25 @@ interface WEBGL_multi_draw { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) */ - multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: number, countsList: Int32Array | GLsizei[], countsOffset: number, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: number, drawcount: GLsizei): void; + multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; /** * The **`WEBGL_multi_draw.multiDrawArraysWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawArrays() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) */ - multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: number, countsList: Int32Array | GLsizei[], countsOffset: number, drawcount: GLsizei): void; + multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, drawcount: GLsizei): void; /** * The **`WEBGL_multi_draw.multiDrawElementsInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElementsInstanced() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) */ - multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: number, drawcount: GLsizei): void; + multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; /** * The **`WEBGL_multi_draw.multiDrawElementsWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElements() method. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) */ - multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; + multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; } /** @@ -11244,7 +11314,7 @@ interface WEBGL_multi_draw { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures) */ -interface WGSLLanguageFeatures { +interface WGSLLanguageFeatures extends ReadonlySet { forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void; } @@ -11845,11 +11915,11 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: number): void; + clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List | Iterable, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: number): void; + clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List | Iterable, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: number): void; + clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List | Iterable, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clientWaitSync) */ clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexImage3D) */ @@ -11883,7 +11953,7 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawArraysInstanced) */ drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */ - drawBuffers(buffers: GLenum[]): void; + drawBuffers(buffers: Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawElementsInstanced) */ drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawRangeElements) */ @@ -11901,7 +11971,7 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniformBlockParameter) */ getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */ - getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any; + getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable, pname: GLenum): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getBufferSubData) */ getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: number, length?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getFragDataLocation) */ @@ -11923,11 +11993,11 @@ interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformBlockIndex) */ getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */ - getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null; + getUniformIndices(program: WebGLProgram, uniformNames: Iterable): GLuint[] | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */ - invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void; + invalidateFramebuffer(target: GLenum, attachments: Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */ - invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; + invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isQuery) */ isQuery(query: WebGLQuery | null): GLboolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isSampler) */ @@ -11964,47 +12034,47 @@ interface WebGL2RenderingContextBase { texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */ - transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void; + transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable, bufferMode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: number, srcLength?: GLuint): void; + uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformBlockBinding) */ uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribDivisor) */ vertexAttribDivisor(index: GLuint, divisor: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4iv(index: GLuint, values: Int32List): void; + vertexAttribI4iv(index: GLuint, values: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4uiv(index: GLuint, values: Uint32List): void; + vertexAttribI4uiv(index: GLuint, values: Uint32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribIPointer) */ vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/waitSync) */ @@ -12304,27 +12374,27 @@ interface WebGL2RenderingContextOverloads { texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform1fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform1iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform2fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform2iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform3fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform3iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniform4fv(location: WebGLUniformLocation | null, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: number, srcLength?: GLuint): void; + uniform4iv(location: WebGLUniformLocation | null, data: Int32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: number, srcLength?: GLuint): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List | Iterable, srcOffset?: number, srcLength?: GLuint): void; } /** @@ -13014,19 +13084,19 @@ interface WebGLRenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib1f(index: GLuint, x: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib1fv(index: GLuint, values: Float32List): void; + vertexAttrib1fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib2fv(index: GLuint, values: Float32List): void; + vertexAttrib2fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib3fv(index: GLuint, values: Float32List): void; + vertexAttrib3fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib4fv(index: GLuint, values: Float32List): void; + vertexAttrib4fv(index: GLuint, values: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) */ vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/viewport) */ @@ -13349,27 +13419,27 @@ interface WebGLRenderingContextOverloads { texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void; texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform1fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform1iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform2fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform2iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform3fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform3iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void; + uniform4fv(location: WebGLUniformLocation | null, v: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void; + uniform4iv(location: WebGLUniformLocation | null, v: Int32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List | Iterable): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List | Iterable): void; } /** @@ -13579,7 +13649,7 @@ interface WebSocket extends EventTarget { declare var WebSocket: { prototype: WebSocket; - new(url: string | URL, protocols?: string | string[]): WebSocket; + new(url: string | URL, protocols?: string | Iterable): WebSocket; readonly CONNECTING: 0; readonly OPEN: 1; readonly CLOSING: 2; @@ -14377,7 +14447,7 @@ declare namespace WebAssembly { var Exception: { prototype: Exception; - new(exceptionTag: Tag, payload: any[], options?: ExceptionOptions): Exception; + new(exceptionTag: Tag, payload: Iterable, options?: ExceptionOptions): Exception; }; /** @@ -14714,7 +14784,7 @@ interface Console { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */ - table(tabularData?: any, properties?: string[]): void; + table(tabularData?: any, properties?: Iterable): void; /** * The **`console.time()`** static method starts a timer you can use to track how long an operation takes. You give each timer a unique name, and may have up to 10,000 timers running on a given page. When you call console.timeEnd() with the same name, the browser will output the time, in milliseconds, that elapsed since the timer was started. * @@ -14784,7 +14854,7 @@ interface QueuingStrategySize { } interface ReportingObserverCallback { - (reports: Report[], observer: ReportingObserver): void; + (reports: Iterable, observer: ReportingObserver): void; } interface SchedulerPostTaskCallback { @@ -15170,421 +15240,3 @@ type WebTransportErrorSource = "session" | "stream"; type WorkerType = "classic" | "module"; type WriteCommandType = "seek" | "truncate" | "write"; type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text"; - - -///////////////////////////// -/// Worker Iterable APIs -///////////////////////////// - -interface CSSNumericArray { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, CSSNumericValue]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface CSSTransformValue { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, CSSTransformComponent]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface CSSUnparsedValue { - [Symbol.iterator](): ArrayIterator; - entries(): ArrayIterator<[number, CSSUnparsedSegment]>; - keys(): ArrayIterator; - values(): ArrayIterator; -} - -interface Cache { - /** - * The **`addAll()`** method of the Cache interface takes an array of URLs, retrieves them, and adds the resulting response objects to the given cache. The request objects created during retrieval become keys to the stored response operations. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) - */ - addAll(requests: Iterable): Promise; -} - -interface CanvasPath { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect) */ - roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable): void; -} - -interface CanvasPathDrawingStyles { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash) */ - setLineDash(segments: Iterable): void; -} - -interface CookieStoreManager { - /** - * The **`subscribe()`** method of the CookieStoreManager interface subscribes a ServiceWorkerRegistration to cookie change events. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/subscribe) - */ - subscribe(subscriptions: Iterable): Promise; - /** - * The **`unsubscribe()`** method of the CookieStoreManager interface stops the ServiceWorkerRegistration from receiving previously subscribed events. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/unsubscribe) - */ - unsubscribe(subscriptions: Iterable): Promise; -} - -interface DOMStringList { - [Symbol.iterator](): ArrayIterator; -} - -interface FileList { - [Symbol.iterator](): ArrayIterator; -} - -interface FontFaceSet extends Set { -} - -interface FormDataIterator extends IteratorObject { - [Symbol.iterator](): FormDataIterator; -} - -interface FormData { - [Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>; - /** Returns an array of key, value pairs for every entry in the list. */ - entries(): FormDataIterator<[string, FormDataEntryValue]>; - /** Returns a list of keys in the list. */ - keys(): FormDataIterator; - /** Returns a list of values in the list. */ - values(): FormDataIterator; -} - -interface GPUBindingCommandsMixin { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ - setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; -} - -interface GPUCommandEncoder { - /** - * The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) - */ - copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; - /** - * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) - */ - copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable): void; - /** - * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) - */ - copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; -} - -interface GPUQueue { - /** - * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) - */ - copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable): void; - /** - * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) - */ - submit(commandBuffers: Iterable): void; - /** - * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) - */ - writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable): void; -} - -interface GPURenderPassEncoder { - /** - * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) - */ - executeBundles(bundles: Iterable): void; - /** - * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property). - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) - */ - setBlendConstant(color: Iterable): void; -} - -interface GPUSupportedFeatures extends ReadonlySet { -} - -interface HeadersIterator extends IteratorObject { - [Symbol.iterator](): HeadersIterator; -} - -interface Headers { - [Symbol.iterator](): HeadersIterator<[string, string]>; - /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ - entries(): HeadersIterator<[string, string]>; - /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */ - keys(): HeadersIterator; - /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ - values(): HeadersIterator; -} - -interface IDBDatabase { - /** - * The **`transaction`** method of the IDBDatabase interface immediately returns a transaction object (IDBTransaction) containing the IDBTransaction.objectStore method, which you can use to access your object store. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction) - */ - transaction(storeNames: string | Iterable, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction; -} - -interface IDBObjectStore { - /** - * The **`createIndex()`** method of the IDBObjectStore interface creates and returns a new IDBIndex object in the connected database. It creates a new field/column defining a new data point for each database record to contain. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex) - */ - createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; -} - -interface ImageTrackList { - [Symbol.iterator](): ArrayIterator; -} - -interface MessageEvent { - /** @deprecated */ - initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; -} - -interface StylePropertyMapReadOnlyIterator extends IteratorObject { - [Symbol.iterator](): StylePropertyMapReadOnlyIterator; -} - -interface StylePropertyMapReadOnly { - [Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, Iterable]>; - entries(): StylePropertyMapReadOnlyIterator<[string, Iterable]>; - keys(): StylePropertyMapReadOnlyIterator; - values(): StylePropertyMapReadOnlyIterator>; -} - -interface SubtleCrypto { - /** - * The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) - */ - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable): Promise; - /** - * The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms). - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) - */ - generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; - generateKey(algorithm: "X25519" | { name: "X25519" }, extractable: boolean, keyUsages: ReadonlyArray<"deriveBits" | "deriveKey">): Promise; - generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; - generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; - generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable): Promise; - /** - * The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) - */ - importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray): Promise; - importKey(format: Exclude, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; - /** - * The **`unwrapKey()`** method of the SubtleCrypto interface "unwraps" a key. This means that it takes as its input a key that has been exported and then encrypted (also called "wrapped"). It decrypts the key and then imports it, returning a CryptoKey object that can be used in the Web Crypto API. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) - */ - unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; -} - -interface URLSearchParamsIterator extends IteratorObject { - [Symbol.iterator](): URLSearchParamsIterator; -} - -interface URLSearchParams { - [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; - /** Returns an array of key, value pairs for every entry in the search params. */ - entries(): URLSearchParamsIterator<[string, string]>; - /** Returns a list of keys in the search params. */ - keys(): URLSearchParamsIterator; - /** Returns a list of values in the search params. */ - values(): URLSearchParamsIterator; -} - -interface WEBGL_draw_buffers { - /** - * The **`WEBGL_draw_buffers.drawBuffersWEBGL()`** method is part of the WebGL API and allows you to define the draw buffers to which all fragment colors are written. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL) - */ - drawBuffersWEBGL(buffers: Iterable): void; -} - -interface WEBGL_multi_draw { - /** - * The **`WEBGL_multi_draw.multiDrawArraysInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawArraysInstanced() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) - */ - multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; - /** - * The **`WEBGL_multi_draw.multiDrawArraysWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawArrays() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) - */ - multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable, firstsOffset: number, countsList: Int32Array | Iterable, countsOffset: number, drawcount: GLsizei): void; - /** - * The **`WEBGL_multi_draw.multiDrawElementsInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElementsInstanced() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) - */ - multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, instanceCountsList: Int32Array | Iterable, instanceCountsOffset: number, drawcount: GLsizei): void; - /** - * The **`WEBGL_multi_draw.multiDrawElementsWEBGL()`** method of the WebGL API renders multiple primitives from array data. It is identical to multiple calls to the gl.drawElements() method. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) - */ - multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; -} - -interface WGSLLanguageFeatures extends ReadonlySet { -} - -interface WebGL2RenderingContextBase { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */ - drawBuffers(buffers: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */ - getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable, pname: GLenum): any; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */ - getUniformIndices(program: WebGLProgram, uniformNames: Iterable): GLuint[] | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */ - invalidateFramebuffer(target: GLenum, attachments: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */ - invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */ - transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable, bufferMode: GLenum): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform1uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform2uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform3uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */ - uniform4uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4iv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */ - vertexAttribI4uiv(index: GLuint, values: Iterable): void; -} - -interface WebGL2RenderingContextOverloads { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: number, srcLength?: GLuint): void; -} - -interface WebGLRenderingContextBase { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib1fv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib2fv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib3fv(index: GLuint, values: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */ - vertexAttrib4fv(index: GLuint, values: Iterable): void; -} - -interface WebGLRenderingContextOverloads { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform1iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform2iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform3iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4fv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */ - uniform4iv(location: WebGLUniformLocation | null, v: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */ - uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; -} - - -///////////////////////////// -/// Worker Async Iterable APIs -///////////////////////////// - -interface FileSystemDirectoryHandleAsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator; -} - -interface FileSystemDirectoryHandle { - [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; - entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemDirectoryHandle | FileSystemFileHandle]>; - keys(): FileSystemDirectoryHandleAsyncIterator; - values(): FileSystemDirectoryHandleAsyncIterator; -} - -interface ReadableStreamAsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): ReadableStreamAsyncIterator; -} - -interface ReadableStream { - [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; - values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; -} diff --git a/src/build/emitter.ts b/src/build/emitter.ts index a05c088b3..887f1a945 100644 --- a/src/build/emitter.ts +++ b/src/build/emitter.ts @@ -241,20 +241,30 @@ export function emitWebIdl( getParentsWithConstant, ); + // Shared computation for sequence typedef resolution used by iterable emission + const sequenceTypedefs = !webidl.typedefs + ? [] + : webidl.typedefs.typedef + .filter((typedef) => Array.isArray(typedef.type)) + .map((typedef) => ({ + ...typedef, + type: (typedef.type as Browser.Typed[]).filter( + (t) => t.type === "sequence", + ), + })) + .filter((typedef) => typedef.type.length); + const sequenceTypedefMap = arrayToMap( + sequenceTypedefs, + (t) => t.name, + (t) => t, + ); + switch (iterator) { case "sync": return emitES6DomIterators(); case "async": return emitES2018DomAsyncIterators(); default: - if (compilerBehavior.includeIterable) { - const main = emit(); - iterator = "sync"; - const iterables = emitES6DomIterators(); - iterator = "async"; - const asyncIterables = emitES2018DomAsyncIterators(); - return [main, iterables, asyncIterables].join("\n\n"); - } return emit(); } @@ -773,7 +783,10 @@ export function emitWebIdl( p = { ...p, additionalTypes: [...(p.additionalTypes ?? [])] }; p.additionalTypes!.push("URL"); } - const pType = convertDomTypeToTsType(p); + const pType = + compilerBehavior.includeIterable && !p.overrideType + ? convertTypedToIterable(p) + : convertDomTypeToTsType(p); const isOptional = !p.variadic && p.optional; const variadicParams = p.variadic && pType.indexOf("|") !== -1; @@ -1307,6 +1320,181 @@ export function emitWebIdl( .forEach(emitNamedConstructor); } + // https://webidl.spec.whatwg.org/#dfn-indexed-property-getter + function isIndexedPropertyGetter(m: Browser.AnonymousMethod) { + return ( + m.getter && + m.signature[0]?.param?.length === 1 && + typeof m.signature[0].param[0].type === "string" && + integerTypes.has(m.signature[0].param[0].type) + ); + } + + function hasSequenceArgument(s: Browser.Signature) { + function typeIncludesSequence(type: string | Browser.Typed[]): boolean { + if (Array.isArray(type)) { + return type.some((t) => typeIncludesSequence(t.type)); + } + return type === "sequence" || !!sequenceTypedefMap[type]; + } + return s.param?.some( + (p) => !p.overrideType && typeIncludesSequence(p.type), + ); + } + + function replaceTypedefsInSignatures( + signatures: Browser.Signature[], + ): Browser.Signature[] { + return signatures.map((s) => { + const params = s.param!.map((p) => { + const typedef = + typeof p.type === "string" ? sequenceTypedefMap[p.type] : undefined; + if (!typedef) { + return p; + } + return { ...p, type: typedef.type }; + }); + return { ...s, param: params }; + }); + } + + function getTypedefIterableExtras(typeName: string): string | undefined { + const typedef = sequenceTypedefMap[typeName]; + if (!typedef) { + return undefined; + } + + const iterableParts: string[] = []; + function collect(typed: Browser.Typed) { + if (typeof typed.type === "string") { + if (typed.type === "sequence") { + const subtypeString = arrayify(typed.subtype) + .map((t) => convertDomTypeToTsType(t)) + .join(", "); + iterableParts.push(`Iterable<${subtypeString}>`); + } + } else { + for (const t of typed.type) { + collect(t); + } + } + } + collect(typedef); + return iterableParts.length > 0 ? iterableParts.join(" | ") : undefined; + } + + function convertTypedToIterable(obj: Browser.Typed): string { + if (typeof obj.type === "string") { + if (obj.type === "sequence") { + const subtypeString = arrayify(obj.subtype) + .map((t) => convertDomTypeToTsType(t)) + .join(", "); + return `Iterable<${subtypeString}>`; + } + if (compilerBehavior.includeIterable) { + const extras = getTypedefIterableExtras(obj.type); + if (extras) { + const base = convertDomTypeToTsType({ ...obj, nullable: undefined }); + const result = `${base} | ${extras}`; + return obj.nullable ? makeNullable(result) : result; + } + } + return convertDomTypeToTsType(obj); + } + const result = obj.type.map((t) => convertTypedToIterable(t)).join(" | "); + return obj.nullable ? makeNullable(result) : result; + } + + function replaceSequencesWithIterables( + signatures: Browser.Signature[], + ): Browser.Signature[] { + return signatures.map((s) => { + const params = s.param!.map((p) => { + if (p.overrideType) { + return p; + } + const converted = convertTypedToIterable(p); + const original = convertDomTypeToTsType(p); + if (converted === original) { + return p; + } + return { + ...p, + overrideType: p.nullable ? `(${converted}) | null` : converted, + }; + }); + return { ...s, param: params }; + }); + } + + function getSyncIterableSubtypes(i: Browser.Interface) { + if (i.iterator && i.iterator.kind !== "async_iterable") { + if (i.iterator.type.length === 1) { + return [convertDomTypeToTsType(i.iterator.type[0])]; + } + return i.iterator.type.map(convertDomTypeToTsType); + } else if (i.name !== "Window") { + const anonymousGetter = i.anonymousMethods?.method.find( + isIndexedPropertyGetter, + ); + const iterableGetter = + anonymousGetter ?? + (i.methods + ? mapToArray(i.methods.method).find(isIndexedPropertyGetter) + : undefined); + if (iterableGetter) { + return [ + convertDomTypeToTsType({ + type: iterableGetter.signature[0].type, + overrideType: iterableGetter.signature[0].overrideType, + }), + ]; + } + } + } + + function getAsyncIterableSubtypes(i: Browser.Interface) { + if (i.iterator && i.iterator.kind === "async_iterable") { + if (i.iterator.type.length === 1) { + return [convertDomTypeToTsType(i.iterator.type[0])]; + } + return i.iterator.type.map(convertDomTypeToTsType); + } + } + + function getMethodsWithSequence(i: Browser.Interface): Browser.Method[] { + return mapToArray(i.methods ? i.methods.method : {}) + .filter((m) => m.signature && !m.overrideSignatures && !m.static) + .map((m) => ({ + ...m, + signature: replaceSequencesWithIterables( + replaceTypedefsInSignatures(m.signature.filter(hasSequenceArgument)), + ), + })) + .filter((m) => m.signature.length) + .sort(compareName); + } + + function getIteratorExtends( + iterator?: Browser.Iterator, + subtypes?: string[], + ) { + if (!iterator || !subtypes) { + return ""; + } + const base = + iterator.kind === "maplike" + ? `Map<${subtypes[0]}, ${subtypes[1]}>` + : iterator.kind === "setlike" + ? `Set<${subtypes[0]}>` + : undefined; + if (!base) { + return ""; + } + const result = iterator.readonly ? `Readonly${base}` : base; + return `extends ${result} `; + } + function emitInterfaceDeclaration(i: Browser.Interface) { function processIName(iName: string) { return extendConflictsBaseTypes[iName] ? `${iName}Base` : iName; @@ -1348,6 +1536,15 @@ export function emitWebIdl( .filter((i) => i !== "Object") .map(processExtends); + if (compilerBehavior.includeIterable) { + const subtypes = getSyncIterableSubtypes(i); + const ext = getIteratorExtends(i.iterator, subtypes); + if (ext) { + // ext is "extends Foo ", trim to just the type name + finalExtends.push(ext.slice("extends ".length).trimEnd()); + } + } + if (finalExtends.length) { printer.print(` extends ${assertUnique(finalExtends).join(", ")}`); } @@ -1485,6 +1682,10 @@ export function emitWebIdl( printer.clearStack(); emitInterfaceEventMap(i); + if (compilerBehavior.includeIterable) { + emitSelfIterators(i); + } + emitInterfaceDeclaration(i); printer.increaseIndent(); @@ -1493,6 +1694,11 @@ export function emitWebIdl( emitEventHandlers(/*prefix*/ "", i); emitIndexers("InstanceOnly", i); + if (compilerBehavior.includeIterable) { + emitSyncIteratorMethods(i); + emitAsyncIterableMembers(i); + } + printer.decreaseIndent(); printer.printLine("}"); printer.printLine(""); @@ -1772,127 +1978,41 @@ export function emitWebIdl( } } - function emitIterator(i: Browser.Interface) { - // https://webidl.spec.whatwg.org/#dfn-indexed-property-getter - const isIndexedPropertyGetter = (m: Browser.AnonymousMethod) => - m.getter && - m.signature[0]?.param?.length === 1 && - typeof m.signature[0].param[0].type === "string" && - integerTypes.has(m.signature[0].param[0].type); - - function findIterableGetter() { - const anonymousGetter = i.anonymousMethods?.method.find( - isIndexedPropertyGetter, - ); - - if (anonymousGetter) { - return anonymousGetter; - } else if (i.methods) { - return mapToArray(i.methods.method).find(isIndexedPropertyGetter); - } else { - return undefined; - } + function emitSelfIterators(i: Browser.Interface) { + const syncSubtypes = getSyncIterableSubtypes(i); + if (i.iterator?.kind === "iterable" && syncSubtypes?.length === 2) { + emitSelfIterator(i); } - - function getIteratorSubtypes() { - if (i.iterator && i.iterator.kind !== "async_iterable") { - if (i.iterator.type.length === 1) { - return [convertDomTypeToTsType(i.iterator.type[0])]; - } - return i.iterator.type.map(convertDomTypeToTsType); - } else if (i.name !== "Window") { - const iterableGetter = findIterableGetter(); - if (iterableGetter) { - return [ - convertDomTypeToTsType({ - type: iterableGetter.signature[0].type, - overrideType: iterableGetter.signature[0].overrideType, - }), - ]; - } - } + if (getAsyncIterableSubtypes(i)) { + emitSelfIterator(i); } + } - function getIteratorExtends( - iterator?: Browser.Iterator, - subtypes?: string[], - ) { - if (!iterator || !subtypes) { - return ""; - } - const base = - iterator.kind === "maplike" - ? `Map<${subtypes[0]}, ${subtypes[1]}>` - : iterator.kind === "setlike" - ? `Set<${subtypes[0]}>` - : undefined; - if (!base) { - return ""; - } - const result = iterator.readonly ? `Readonly${base}` : base; - return `extends ${result} `; - } + function emitSyncIterableMembers(i: Browser.Interface) { + const methodsWithSequence = getMethodsWithSequence(i); + methodsWithSequence.forEach((m) => emitMethod("", m, new Set())); + emitSyncIteratorMethods(i); + } - function hasSequenceArgument(s: Browser.Signature) { - function typeIncludesSequence(type: string | Browser.Typed[]): boolean { - if (Array.isArray(type)) { - return type.some((t) => typeIncludesSequence(t.type)); - } - return type === "sequence" || !!sequenceTypedefMap[type]; - } - return s.param?.some( - (p) => !p.overrideType && typeIncludesSequence(p.type), - ); + function emitSyncIteratorMethods(i: Browser.Interface) { + const subtypes = getSyncIterableSubtypes(i); + if (subtypes) { + emitIterableMethods(i, getName(i), subtypes); } + } - function replaceTypedefsInSignatures( - signatures: Browser.Signature[], - ): Browser.Signature[] { - return signatures.map((s) => { - const params = s.param!.map((p) => { - const typedef = - typeof p.type === "string" ? sequenceTypedefMap[p.type] : undefined; - if (!typedef) { - return p; - } - return { ...p, type: typedef.type }; - }); - return { ...s, param: params }; - }); + function emitAsyncIterableMembers(i: Browser.Interface) { + const subtypes = getAsyncIterableSubtypes(i); + if (subtypes) { + emitIterableMethods(i, getName(i), subtypes); } + } - const sequenceTypedefs = !webidl.typedefs - ? [] - : webidl.typedefs.typedef - .filter((typedef) => Array.isArray(typedef.type)) - .map((typedef) => ({ - ...typedef, - type: (typedef.type as Browser.Typed[]).filter( - (t) => t.type === "sequence", - ), - })) - .filter((typedef) => typedef.type.length); - const sequenceTypedefMap = arrayToMap( - sequenceTypedefs, - (t) => t.name, - (t) => t, - ); - - const subtypes = getIteratorSubtypes(); - const methodsWithSequence: Browser.Method[] = mapToArray( - i.methods ? i.methods.method : {}, - ) - .filter((m) => m.signature && !m.overrideSignatures && !m.static) - .map((m) => ({ - ...m, - signature: replaceTypedefsInSignatures( - m.signature.filter(hasSequenceArgument), - ), - })) - .filter((m) => m.signature.length) - .sort(compareName); + function emitIterator(i: Browser.Interface) { + const subtypes = getSyncIterableSubtypes(i); + const hasMethodsWithSequence = getMethodsWithSequence(i).length > 0; - if (!subtypes && !methodsWithSequence.length) { + if (!subtypes && !hasMethodsWithSequence) { return; } @@ -1913,28 +2033,14 @@ export function emitWebIdl( ); printer.increaseIndent(); - methodsWithSequence.forEach((m) => emitMethod("", m, new Set())); - - if (subtypes) { - emitIterableMethods(i, name, subtypes); - } + emitSyncIterableMembers(i); printer.decreaseIndent(); printer.printLine("}"); } function emitAsyncIterator(i: Browser.Interface) { - function getAsyncIteratorSubtypes() { - if (i.iterator && i.iterator.kind === "async_iterable") { - if (i.iterator.type.length === 1) { - return [convertDomTypeToTsType(i.iterator.type[0])]; - } - return i.iterator.type.map(convertDomTypeToTsType); - } - } - - const subtypes = getAsyncIteratorSubtypes(); - if (!subtypes) { + if (!getAsyncIterableSubtypes(i)) { return; } @@ -1950,7 +2056,7 @@ export function emitWebIdl( printer.printLine(`interface ${nameWithTypeParameters} {`); printer.increaseIndent(); - emitIterableMethods(i, name, subtypes); + emitAsyncIterableMembers(i); printer.decreaseIndent(); printer.printLine("}");