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