massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-tsserver / node_modules / typescript / lib / lib.webworker.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 /// Worker Iterable APIs
23 /////////////////////////////
24
25 interface Cache {
26     addAll(requests: Iterable<RequestInfo>): Promise<void>;
27 }
28
29 interface DOMStringList {
30     [Symbol.iterator](): IterableIterator<string>;
31 }
32
33 interface FileList {
34     [Symbol.iterator](): IterableIterator<File>;
35 }
36
37 interface FontFaceSet extends Set<FontFace> {
38 }
39
40 interface FormData {
41     [Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>;
42     /** Returns an array of key, value pairs for every entry in the list. */
43     entries(): IterableIterator<[string, FormDataEntryValue]>;
44     /** Returns a list of keys in the list. */
45     keys(): IterableIterator<string>;
46     /** Returns a list of values in the list. */
47     values(): IterableIterator<FormDataEntryValue>;
48 }
49
50 interface Headers {
51     [Symbol.iterator](): IterableIterator<[string, string]>;
52     /** Returns an iterator allowing to go through all key/value pairs contained in this object. */
53     entries(): IterableIterator<[string, string]>;
54     /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
55     keys(): IterableIterator<string>;
56     /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
57     values(): IterableIterator<string>;
58 }
59
60 interface IDBDatabase {
61     /** 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. */
62     transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode): IDBTransaction;
63 }
64
65 interface IDBObjectStore {
66     /**
67      * 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.
68      *
69      * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
70      */
71     createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
72 }
73
74 interface MessageEvent<T = any> {
75     /** @deprecated */
76     initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
77 }
78
79 interface SubtleCrypto {
80     deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
81     generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
82     generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
83     generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
84     importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
85     importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
86     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>;
87 }
88
89 interface URLSearchParams {
90     [Symbol.iterator](): IterableIterator<[string, string]>;
91     /** Returns an array of key, value pairs for every entry in the search params. */
92     entries(): IterableIterator<[string, string]>;
93     /** Returns a list of keys in the search params. */
94     keys(): IterableIterator<string>;
95     /** Returns a list of values in the search params. */
96     values(): IterableIterator<string>;
97 }
98
99 interface WEBGL_draw_buffers {
100     drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
101 }
102
103 interface WebGL2RenderingContextBase {
104     clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
105     clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;
106     clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: GLuint): void;
107     drawBuffers(buffers: Iterable<GLenum>): void;
108     getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable<GLuint>, pname: GLenum): any;
109     getUniformIndices(program: WebGLProgram, uniformNames: Iterable<string>): Iterable<GLuint> | null;
110     invalidateFramebuffer(target: GLenum, attachments: Iterable<GLenum>): void;
111     invalidateSubFramebuffer(target: GLenum, attachments: Iterable<GLenum>, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
112     transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void;
113     uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
114     uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
115     uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
116     uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
117     uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
118     uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
119     uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
120     uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
121     uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
122     uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
123     vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void;
124     vertexAttribI4uiv(index: GLuint, values: Iterable<GLuint>): void;
125 }
126
127 interface WebGL2RenderingContextOverloads {
128     uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
129     uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
130     uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
131     uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
132     uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
133     uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
134     uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
135     uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
136     uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
137     uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
138     uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
139 }
140
141 interface WebGLRenderingContextBase {
142     vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void;
143     vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void;
144     vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void;
145     vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void;
146 }
147
148 interface WebGLRenderingContextOverloads {
149     uniform1fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
150     uniform1iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
151     uniform2fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
152     uniform2iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
153     uniform3fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
154     uniform3iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
155     uniform4fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
156     uniform4iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
157     uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
158     uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
159     uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
160 }