1///////////////////////////// 2/// Window Iterable APIs 3///////////////////////////// 4 5interface AudioParam { 6 setValueCurveAtTime(values: Iterable<number>, startTime: number, duration: number): AudioParam; 7} 8 9interface AudioParamMap extends ReadonlyMap<string, AudioParam> { 10} 11 12interface BaseAudioContext { 13 createIIRFilter(feedforward: Iterable<number>, feedback: Iterable<number>): IIRFilterNode; 14 createPeriodicWave(real: Iterable<number>, imag: Iterable<number>, constraints?: PeriodicWaveConstraints): PeriodicWave; 15} 16 17interface CSSRuleList { 18 [Symbol.iterator](): IterableIterator<CSSRule>; 19} 20 21interface CSSStyleDeclaration { 22 [Symbol.iterator](): IterableIterator<string>; 23} 24 25interface Cache { 26 addAll(requests: Iterable<RequestInfo>): Promise<void>; 27} 28 29interface CanvasPath { 30 roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable<number | DOMPointInit>): void; 31} 32 33interface CanvasPathDrawingStyles { 34 setLineDash(segments: Iterable<number>): void; 35} 36 37interface DOMRectList { 38 [Symbol.iterator](): IterableIterator<DOMRect>; 39} 40 41interface DOMStringList { 42 [Symbol.iterator](): IterableIterator<string>; 43} 44 45interface DOMTokenList { 46 [Symbol.iterator](): IterableIterator<string>; 47 entries(): IterableIterator<[number, string]>; 48 keys(): IterableIterator<number>; 49 values(): IterableIterator<string>; 50} 51 52interface DataTransferItemList { 53 [Symbol.iterator](): IterableIterator<DataTransferItem>; 54} 55 56interface EventCounts extends ReadonlyMap<string, number> { 57} 58 59interface FileList { 60 [Symbol.iterator](): IterableIterator<File>; 61} 62 63interface FontFaceSet extends Set<FontFace> { 64} 65 66interface FormData { 67 [Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>; 68 /** Returns an array of key, value pairs for every entry in the list. */ 69 entries(): IterableIterator<[string, FormDataEntryValue]>; 70 /** Returns a list of keys in the list. */ 71 keys(): IterableIterator<string>; 72 /** Returns a list of values in the list. */ 73 values(): IterableIterator<FormDataEntryValue>; 74} 75 76interface HTMLAllCollection { 77 [Symbol.iterator](): IterableIterator<Element>; 78} 79 80interface HTMLCollectionBase { 81 [Symbol.iterator](): IterableIterator<Element>; 82} 83 84interface HTMLCollectionOf<T extends Element> { 85 [Symbol.iterator](): IterableIterator<T>; 86} 87 88interface HTMLFormElement { 89 [Symbol.iterator](): IterableIterator<Element>; 90} 91 92interface HTMLSelectElement { 93 [Symbol.iterator](): IterableIterator<HTMLOptionElement>; 94} 95 96interface Headers { 97 [Symbol.iterator](): IterableIterator<[string, string]>; 98 /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ 99 entries(): IterableIterator<[string, string]>; 100 /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */ 101 keys(): IterableIterator<string>; 102 /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ 103 values(): IterableIterator<string>; 104} 105 106interface IDBDatabase { 107 /** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */ 108 transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction; 109} 110 111interface IDBObjectStore { 112 /** 113 * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException. 114 * 115 * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction. 116 */ 117 createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex; 118} 119 120interface MediaKeyStatusMap { 121 [Symbol.iterator](): IterableIterator<[BufferSource, MediaKeyStatus]>; 122 entries(): IterableIterator<[BufferSource, MediaKeyStatus]>; 123 keys(): IterableIterator<BufferSource>; 124 values(): IterableIterator<MediaKeyStatus>; 125} 126 127interface MediaList { 128 [Symbol.iterator](): IterableIterator<string>; 129} 130 131interface MessageEvent<T = any> { 132 /** @deprecated */ 133 initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void; 134} 135 136interface MimeTypeArray { 137 [Symbol.iterator](): IterableIterator<MimeType>; 138} 139 140interface NamedNodeMap { 141 [Symbol.iterator](): IterableIterator<Attr>; 142} 143 144interface Navigator { 145 /** Available only in secure contexts. */ 146 requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>; 147 vibrate(pattern: Iterable<number>): boolean; 148} 149 150interface NodeList { 151 [Symbol.iterator](): IterableIterator<Node>; 152 /** Returns an array of key, value pairs for every entry in the list. */ 153 entries(): IterableIterator<[number, Node]>; 154 /** Returns an list of keys in the list. */ 155 keys(): IterableIterator<number>; 156 /** Returns an list of values in the list. */ 157 values(): IterableIterator<Node>; 158} 159 160interface NodeListOf<TNode extends Node> { 161 [Symbol.iterator](): IterableIterator<TNode>; 162 /** Returns an array of key, value pairs for every entry in the list. */ 163 entries(): IterableIterator<[number, TNode]>; 164 /** Returns an list of keys in the list. */ 165 keys(): IterableIterator<number>; 166 /** Returns an list of values in the list. */ 167 values(): IterableIterator<TNode>; 168} 169 170interface Plugin { 171 [Symbol.iterator](): IterableIterator<MimeType>; 172} 173 174interface PluginArray { 175 [Symbol.iterator](): IterableIterator<Plugin>; 176} 177 178interface RTCRtpTransceiver { 179 setCodecPreferences(codecs: Iterable<RTCRtpCodecCapability>): void; 180} 181 182interface RTCStatsReport extends ReadonlyMap<string, any> { 183} 184 185interface SVGLengthList { 186 [Symbol.iterator](): IterableIterator<SVGLength>; 187} 188 189interface SVGNumberList { 190 [Symbol.iterator](): IterableIterator<SVGNumber>; 191} 192 193interface SVGPointList { 194 [Symbol.iterator](): IterableIterator<DOMPoint>; 195} 196 197interface SVGStringList { 198 [Symbol.iterator](): IterableIterator<string>; 199} 200 201interface SVGTransformList { 202 [Symbol.iterator](): IterableIterator<SVGTransform>; 203} 204 205interface SourceBufferList { 206 [Symbol.iterator](): IterableIterator<SourceBuffer>; 207} 208 209interface SpeechRecognitionResult { 210 [Symbol.iterator](): IterableIterator<SpeechRecognitionAlternative>; 211} 212 213interface SpeechRecognitionResultList { 214 [Symbol.iterator](): IterableIterator<SpeechRecognitionResult>; 215} 216 217interface StyleSheetList { 218 [Symbol.iterator](): IterableIterator<CSSStyleSheet>; 219} 220 221interface SubtleCrypto { 222 deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; 223 generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>; 224 generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>; 225 generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>; 226 importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>; 227 importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; 228 unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; 229} 230 231interface TextTrackCueList { 232 [Symbol.iterator](): IterableIterator<TextTrackCue>; 233} 234 235interface TextTrackList { 236 [Symbol.iterator](): IterableIterator<TextTrack>; 237} 238 239interface TouchList { 240 [Symbol.iterator](): IterableIterator<Touch>; 241} 242 243interface URLSearchParams { 244 [Symbol.iterator](): IterableIterator<[string, string]>; 245 /** Returns an array of key, value pairs for every entry in the search params. */ 246 entries(): IterableIterator<[string, string]>; 247 /** Returns a list of keys in the search params. */ 248 keys(): IterableIterator<string>; 249 /** Returns a list of values in the search params. */ 250 values(): IterableIterator<string>; 251} 252 253interface WEBGL_draw_buffers { 254 drawBuffersWEBGL(buffers: Iterable<GLenum>): void; 255} 256 257interface WEBGL_multi_draw { 258 multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void; 259 multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void; 260 multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void; 261 multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void; 262} 263 264interface WebGL2RenderingContextBase { 265 clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void; 266 clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void; 267 clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: GLuint): void; 268 drawBuffers(buffers: Iterable<GLenum>): void; 269 getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable<GLuint>, pname: GLenum): any; 270 getUniformIndices(program: WebGLProgram, uniformNames: Iterable<string>): Iterable<GLuint> | null; 271 invalidateFramebuffer(target: GLenum, attachments: Iterable<GLenum>): void; 272 invalidateSubFramebuffer(target: GLenum, attachments: Iterable<GLenum>, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; 273 transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void; 274 uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; 275 uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; 276 uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; 277 uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; 278 uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 279 uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 280 uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 281 uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 282 uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 283 uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 284 vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void; 285 vertexAttribI4uiv(index: GLuint, values: Iterable<GLuint>): void; 286} 287 288interface WebGL2RenderingContextOverloads { 289 uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 290 uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; 291 uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 292 uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; 293 uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 294 uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; 295 uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 296 uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; 297 uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 298 uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 299 uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; 300} 301 302interface WebGLRenderingContextBase { 303 vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void; 304 vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void; 305 vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void; 306 vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void; 307} 308 309interface WebGLRenderingContextOverloads { 310 uniform1fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void; 311 uniform1iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void; 312 uniform2fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void; 313 uniform2iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void; 314 uniform3fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void; 315 uniform3iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void; 316 uniform4fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void; 317 uniform4iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void; 318 uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void; 319 uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void; 320 uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void; 321} 322