typescript 5.1.0-dev.20230403 → 5.1.0-dev.20230404
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.dom.d.ts +9716 -1188
- package/lib/lib.dom.iterable.d.ts +82 -3
- package/lib/lib.webworker.d.ts +2671 -287
- package/lib/lib.webworker.iterable.d.ts +71 -2
- package/lib/tsc.js +1 -1
- package/lib/tsserver.js +22 -12
- package/lib/tsserverlibrary.js +22 -12
- package/lib/typescript.js +22 -12
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
|
@@ -42,14 +42,17 @@ interface CSSUnparsedValue {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
interface Cache {
|
|
45
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) */
|
|
45
46
|
addAll(requests: Iterable<RequestInfo>): Promise<void>;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
interface CanvasPath {
|
|
50
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect) */
|
|
49
51
|
roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable<number | DOMPointInit>): void;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
interface CanvasPathDrawingStyles {
|
|
55
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash) */
|
|
53
56
|
setLineDash(segments: Iterable<number>): void;
|
|
54
57
|
}
|
|
55
58
|
|
|
@@ -85,7 +88,11 @@ interface Headers {
|
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
interface IDBDatabase {
|
|
88
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* 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.
|
|
93
|
+
*
|
|
94
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction)
|
|
95
|
+
*/
|
|
89
96
|
transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
|
|
90
97
|
}
|
|
91
98
|
|
|
@@ -94,12 +101,18 @@ interface IDBObjectStore {
|
|
|
94
101
|
* 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.
|
|
95
102
|
*
|
|
96
103
|
* Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
|
|
104
|
+
*
|
|
105
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex)
|
|
97
106
|
*/
|
|
98
107
|
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
|
|
99
108
|
}
|
|
100
109
|
|
|
101
110
|
interface MessageEvent<T = any> {
|
|
102
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated
|
|
113
|
+
*
|
|
114
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/initMessageEvent)
|
|
115
|
+
*/
|
|
103
116
|
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
|
|
104
117
|
}
|
|
105
118
|
|
|
@@ -111,12 +124,16 @@ interface StylePropertyMapReadOnly {
|
|
|
111
124
|
}
|
|
112
125
|
|
|
113
126
|
interface SubtleCrypto {
|
|
127
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
|
114
128
|
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
129
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
|
115
130
|
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
|
|
116
131
|
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
117
132
|
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
|
|
133
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
|
|
118
134
|
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
119
135
|
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
136
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
|
|
120
137
|
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>;
|
|
121
138
|
}
|
|
122
139
|
|
|
@@ -131,71 +148,123 @@ interface URLSearchParams {
|
|
|
131
148
|
}
|
|
132
149
|
|
|
133
150
|
interface WEBGL_draw_buffers {
|
|
151
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL) */
|
|
134
152
|
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
|
|
135
153
|
}
|
|
136
154
|
|
|
137
155
|
interface WEBGL_multi_draw {
|
|
156
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) */
|
|
138
157
|
multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
|
|
158
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) */
|
|
139
159
|
multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void;
|
|
160
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) */
|
|
140
161
|
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;
|
|
162
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) */
|
|
141
163
|
multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void;
|
|
142
164
|
}
|
|
143
165
|
|
|
144
166
|
interface WebGL2RenderingContextBase {
|
|
167
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
|
|
145
168
|
clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
|
|
169
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
|
|
146
170
|
clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;
|
|
171
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
|
|
147
172
|
clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: GLuint): void;
|
|
173
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */
|
|
148
174
|
drawBuffers(buffers: Iterable<GLenum>): void;
|
|
175
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */
|
|
149
176
|
getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable<GLuint>, pname: GLenum): any;
|
|
177
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */
|
|
150
178
|
getUniformIndices(program: WebGLProgram, uniformNames: Iterable<string>): Iterable<GLuint> | null;
|
|
179
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */
|
|
151
180
|
invalidateFramebuffer(target: GLenum, attachments: Iterable<GLenum>): void;
|
|
181
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */
|
|
152
182
|
invalidateSubFramebuffer(target: GLenum, attachments: Iterable<GLenum>, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
|
|
183
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */
|
|
153
184
|
transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void;
|
|
185
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
|
|
154
186
|
uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
187
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
|
|
155
188
|
uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
189
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
|
|
156
190
|
uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
191
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
|
|
157
192
|
uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
193
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
158
194
|
uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
195
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
159
196
|
uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
197
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
160
198
|
uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
199
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
161
200
|
uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
201
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
162
202
|
uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
203
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
163
204
|
uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
205
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */
|
|
164
206
|
vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void;
|
|
207
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */
|
|
165
208
|
vertexAttribI4uiv(index: GLuint, values: Iterable<GLuint>): void;
|
|
166
209
|
}
|
|
167
210
|
|
|
168
211
|
interface WebGL2RenderingContextOverloads {
|
|
212
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
169
213
|
uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
214
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
170
215
|
uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
216
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
171
217
|
uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
218
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
172
219
|
uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
220
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
173
221
|
uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
222
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
174
223
|
uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
224
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
175
225
|
uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
226
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
176
227
|
uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
228
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
177
229
|
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
230
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
178
231
|
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
232
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
179
233
|
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
|
|
180
234
|
}
|
|
181
235
|
|
|
182
236
|
interface WebGLRenderingContextBase {
|
|
237
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
|
|
183
238
|
vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void;
|
|
239
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
|
|
184
240
|
vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void;
|
|
241
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
|
|
185
242
|
vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void;
|
|
243
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
|
|
186
244
|
vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void;
|
|
187
245
|
}
|
|
188
246
|
|
|
189
247
|
interface WebGLRenderingContextOverloads {
|
|
248
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
190
249
|
uniform1fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
|
250
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
191
251
|
uniform1iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
|
|
252
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
192
253
|
uniform2fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
|
254
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
193
255
|
uniform2iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
|
|
256
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
194
257
|
uniform3fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
|
258
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
195
259
|
uniform3iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
|
|
260
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
196
261
|
uniform4fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
|
262
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
197
263
|
uniform4iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
|
|
264
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
198
265
|
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
|
|
266
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
199
267
|
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
|
|
268
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
200
269
|
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
|
|
201
270
|
}
|
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.1";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20230404`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
package/lib/tsserver.js
CHANGED
|
@@ -2292,7 +2292,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2292
2292
|
|
|
2293
2293
|
// src/compiler/corePublic.ts
|
|
2294
2294
|
var versionMajorMinor = "5.1";
|
|
2295
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2295
|
+
var version = `${versionMajorMinor}.0-dev.20230404`;
|
|
2296
2296
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2297
2297
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2298
2298
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -154260,7 +154260,7 @@ var Core;
|
|
|
154260
154260
|
((Core2) => {
|
|
154261
154261
|
function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {
|
|
154262
154262
|
var _a2, _b, _c;
|
|
154263
|
-
node =
|
|
154263
|
+
node = getAdjustedNode2(node, options);
|
|
154264
154264
|
if (isSourceFile(node)) {
|
|
154265
154265
|
const resolvedRef = ts_GoToDefinition_exports.getReferenceAtPosition(node, position, program);
|
|
154266
154266
|
if (!(resolvedRef == null ? void 0 : resolvedRef.file)) {
|
|
@@ -154328,7 +154328,7 @@ var Core;
|
|
|
154328
154328
|
return mergeReferences(program, moduleReferences, references, moduleReferencesOfExportTarget);
|
|
154329
154329
|
}
|
|
154330
154330
|
Core2.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
|
|
154331
|
-
function
|
|
154331
|
+
function getAdjustedNode2(node, options) {
|
|
154332
154332
|
if (options.use === 1 /* References */) {
|
|
154333
154333
|
node = getAdjustedReferenceLocation(node);
|
|
154334
154334
|
} else if (options.use === 2 /* Rename */) {
|
|
@@ -154336,7 +154336,7 @@ var Core;
|
|
|
154336
154336
|
}
|
|
154337
154337
|
return node;
|
|
154338
154338
|
}
|
|
154339
|
-
Core2.getAdjustedNode =
|
|
154339
|
+
Core2.getAdjustedNode = getAdjustedNode2;
|
|
154340
154340
|
function getReferencesForFileName(fileName, program, sourceFiles, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {
|
|
154341
154341
|
var _a2, _b;
|
|
154342
154342
|
const moduleSymbol = (_a2 = program.getSourceFile(fileName)) == null ? void 0 : _a2.symbol;
|
|
@@ -163150,8 +163150,11 @@ function countBinaryExpressionParameters(b) {
|
|
|
163150
163150
|
return isBinaryExpression(b.left) ? countBinaryExpressionParameters(b.left) + 1 : 2;
|
|
163151
163151
|
}
|
|
163152
163152
|
function tryGetParameterInfo(startingToken, position, sourceFile, checker) {
|
|
163153
|
-
const
|
|
163154
|
-
if (
|
|
163153
|
+
const node = getAdjustedNode(startingToken);
|
|
163154
|
+
if (node === void 0)
|
|
163155
|
+
return void 0;
|
|
163156
|
+
const info = getContextualSignatureLocationInfo(node, sourceFile, position, checker);
|
|
163157
|
+
if (info === void 0)
|
|
163155
163158
|
return void 0;
|
|
163156
163159
|
const { contextualType, argumentIndex, argumentCount, argumentsSpan } = info;
|
|
163157
163160
|
const nonNullableContextualType = contextualType.getNonNullableType();
|
|
@@ -163164,16 +163167,23 @@ function tryGetParameterInfo(startingToken, position, sourceFile, checker) {
|
|
|
163164
163167
|
const invocation = { kind: 2 /* Contextual */, signature, node: startingToken, symbol: chooseBetterSymbol(symbol) };
|
|
163165
163168
|
return { isTypeParameterList: false, invocation, argumentsSpan, argumentIndex, argumentCount };
|
|
163166
163169
|
}
|
|
163167
|
-
function
|
|
163168
|
-
|
|
163169
|
-
|
|
163170
|
-
|
|
163170
|
+
function getAdjustedNode(node) {
|
|
163171
|
+
switch (node.kind) {
|
|
163172
|
+
case 20 /* OpenParenToken */:
|
|
163173
|
+
case 27 /* CommaToken */:
|
|
163174
|
+
return node;
|
|
163175
|
+
default:
|
|
163176
|
+
return findAncestor(node.parent, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern(n) || isArrayBindingPattern(n) ? false : "quit");
|
|
163177
|
+
}
|
|
163178
|
+
}
|
|
163179
|
+
function getContextualSignatureLocationInfo(node, sourceFile, position, checker) {
|
|
163180
|
+
const { parent: parent2 } = node;
|
|
163171
163181
|
switch (parent2.kind) {
|
|
163172
163182
|
case 215 /* ParenthesizedExpression */:
|
|
163173
163183
|
case 172 /* MethodDeclaration */:
|
|
163174
163184
|
case 216 /* FunctionExpression */:
|
|
163175
163185
|
case 217 /* ArrowFunction */:
|
|
163176
|
-
const info = getArgumentOrParameterListInfo(
|
|
163186
|
+
const info = getArgumentOrParameterListInfo(node, position, sourceFile);
|
|
163177
163187
|
if (!info)
|
|
163178
163188
|
return void 0;
|
|
163179
163189
|
const { argumentIndex, argumentCount, argumentsSpan } = info;
|
|
@@ -163182,7 +163192,7 @@ function getContextualSignatureLocationInfo(startingToken, sourceFile, position,
|
|
|
163182
163192
|
case 224 /* BinaryExpression */: {
|
|
163183
163193
|
const highestBinary = getHighestBinary(parent2);
|
|
163184
163194
|
const contextualType2 = checker.getContextualType(highestBinary);
|
|
163185
|
-
const argumentIndex2 =
|
|
163195
|
+
const argumentIndex2 = node.kind === 20 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1;
|
|
163186
163196
|
const argumentCount2 = countBinaryExpressionParameters(highestBinary);
|
|
163187
163197
|
return contextualType2 && { contextualType: contextualType2, argumentIndex: argumentIndex2, argumentCount: argumentCount2, argumentsSpan: createTextSpanFromNode(parent2) };
|
|
163188
163198
|
}
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.1";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230404`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -153387,7 +153387,7 @@ ${lanes.join("\n")}
|
|
|
153387
153387
|
((Core2) => {
|
|
153388
153388
|
function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {
|
|
153389
153389
|
var _a2, _b, _c;
|
|
153390
|
-
node =
|
|
153390
|
+
node = getAdjustedNode2(node, options);
|
|
153391
153391
|
if (isSourceFile(node)) {
|
|
153392
153392
|
const resolvedRef = ts_GoToDefinition_exports.getReferenceAtPosition(node, position, program);
|
|
153393
153393
|
if (!(resolvedRef == null ? void 0 : resolvedRef.file)) {
|
|
@@ -153455,7 +153455,7 @@ ${lanes.join("\n")}
|
|
|
153455
153455
|
return mergeReferences(program, moduleReferences, references, moduleReferencesOfExportTarget);
|
|
153456
153456
|
}
|
|
153457
153457
|
Core2.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
|
|
153458
|
-
function
|
|
153458
|
+
function getAdjustedNode2(node, options) {
|
|
153459
153459
|
if (options.use === 1 /* References */) {
|
|
153460
153460
|
node = getAdjustedReferenceLocation(node);
|
|
153461
153461
|
} else if (options.use === 2 /* Rename */) {
|
|
@@ -153463,7 +153463,7 @@ ${lanes.join("\n")}
|
|
|
153463
153463
|
}
|
|
153464
153464
|
return node;
|
|
153465
153465
|
}
|
|
153466
|
-
Core2.getAdjustedNode =
|
|
153466
|
+
Core2.getAdjustedNode = getAdjustedNode2;
|
|
153467
153467
|
function getReferencesForFileName(fileName, program, sourceFiles, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {
|
|
153468
153468
|
var _a2, _b;
|
|
153469
153469
|
const moduleSymbol = (_a2 = program.getSourceFile(fileName)) == null ? void 0 : _a2.symbol;
|
|
@@ -162566,8 +162566,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162566
162566
|
return isBinaryExpression(b.left) ? countBinaryExpressionParameters(b.left) + 1 : 2;
|
|
162567
162567
|
}
|
|
162568
162568
|
function tryGetParameterInfo(startingToken, position, sourceFile, checker) {
|
|
162569
|
-
const
|
|
162570
|
-
if (
|
|
162569
|
+
const node = getAdjustedNode(startingToken);
|
|
162570
|
+
if (node === void 0)
|
|
162571
|
+
return void 0;
|
|
162572
|
+
const info = getContextualSignatureLocationInfo(node, sourceFile, position, checker);
|
|
162573
|
+
if (info === void 0)
|
|
162571
162574
|
return void 0;
|
|
162572
162575
|
const { contextualType, argumentIndex, argumentCount, argumentsSpan } = info;
|
|
162573
162576
|
const nonNullableContextualType = contextualType.getNonNullableType();
|
|
@@ -162580,16 +162583,23 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162580
162583
|
const invocation = { kind: 2 /* Contextual */, signature, node: startingToken, symbol: chooseBetterSymbol(symbol) };
|
|
162581
162584
|
return { isTypeParameterList: false, invocation, argumentsSpan, argumentIndex, argumentCount };
|
|
162582
162585
|
}
|
|
162583
|
-
function
|
|
162584
|
-
|
|
162585
|
-
|
|
162586
|
-
|
|
162586
|
+
function getAdjustedNode(node) {
|
|
162587
|
+
switch (node.kind) {
|
|
162588
|
+
case 20 /* OpenParenToken */:
|
|
162589
|
+
case 27 /* CommaToken */:
|
|
162590
|
+
return node;
|
|
162591
|
+
default:
|
|
162592
|
+
return findAncestor(node.parent, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern(n) || isArrayBindingPattern(n) ? false : "quit");
|
|
162593
|
+
}
|
|
162594
|
+
}
|
|
162595
|
+
function getContextualSignatureLocationInfo(node, sourceFile, position, checker) {
|
|
162596
|
+
const { parent: parent2 } = node;
|
|
162587
162597
|
switch (parent2.kind) {
|
|
162588
162598
|
case 215 /* ParenthesizedExpression */:
|
|
162589
162599
|
case 172 /* MethodDeclaration */:
|
|
162590
162600
|
case 216 /* FunctionExpression */:
|
|
162591
162601
|
case 217 /* ArrowFunction */:
|
|
162592
|
-
const info = getArgumentOrParameterListInfo(
|
|
162602
|
+
const info = getArgumentOrParameterListInfo(node, position, sourceFile);
|
|
162593
162603
|
if (!info)
|
|
162594
162604
|
return void 0;
|
|
162595
162605
|
const { argumentIndex, argumentCount, argumentsSpan } = info;
|
|
@@ -162598,7 +162608,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162598
162608
|
case 224 /* BinaryExpression */: {
|
|
162599
162609
|
const highestBinary = getHighestBinary(parent2);
|
|
162600
162610
|
const contextualType2 = checker.getContextualType(highestBinary);
|
|
162601
|
-
const argumentIndex2 =
|
|
162611
|
+
const argumentIndex2 = node.kind === 20 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1;
|
|
162602
162612
|
const argumentCount2 = countBinaryExpressionParameters(highestBinary);
|
|
162603
162613
|
return contextualType2 && { contextualType: contextualType2, argumentIndex: argumentIndex2, argumentCount: argumentCount2, argumentsSpan: createTextSpanFromNode(parent2) };
|
|
162604
162614
|
}
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.1";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230404`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -153401,7 +153401,7 @@ ${lanes.join("\n")}
|
|
|
153401
153401
|
((Core2) => {
|
|
153402
153402
|
function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {
|
|
153403
153403
|
var _a2, _b, _c;
|
|
153404
|
-
node =
|
|
153404
|
+
node = getAdjustedNode2(node, options);
|
|
153405
153405
|
if (isSourceFile(node)) {
|
|
153406
153406
|
const resolvedRef = ts_GoToDefinition_exports.getReferenceAtPosition(node, position, program);
|
|
153407
153407
|
if (!(resolvedRef == null ? void 0 : resolvedRef.file)) {
|
|
@@ -153469,7 +153469,7 @@ ${lanes.join("\n")}
|
|
|
153469
153469
|
return mergeReferences(program, moduleReferences, references, moduleReferencesOfExportTarget);
|
|
153470
153470
|
}
|
|
153471
153471
|
Core2.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
|
|
153472
|
-
function
|
|
153472
|
+
function getAdjustedNode2(node, options) {
|
|
153473
153473
|
if (options.use === 1 /* References */) {
|
|
153474
153474
|
node = getAdjustedReferenceLocation(node);
|
|
153475
153475
|
} else if (options.use === 2 /* Rename */) {
|
|
@@ -153477,7 +153477,7 @@ ${lanes.join("\n")}
|
|
|
153477
153477
|
}
|
|
153478
153478
|
return node;
|
|
153479
153479
|
}
|
|
153480
|
-
Core2.getAdjustedNode =
|
|
153480
|
+
Core2.getAdjustedNode = getAdjustedNode2;
|
|
153481
153481
|
function getReferencesForFileName(fileName, program, sourceFiles, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {
|
|
153482
153482
|
var _a2, _b;
|
|
153483
153483
|
const moduleSymbol = (_a2 = program.getSourceFile(fileName)) == null ? void 0 : _a2.symbol;
|
|
@@ -162580,8 +162580,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162580
162580
|
return isBinaryExpression(b.left) ? countBinaryExpressionParameters(b.left) + 1 : 2;
|
|
162581
162581
|
}
|
|
162582
162582
|
function tryGetParameterInfo(startingToken, position, sourceFile, checker) {
|
|
162583
|
-
const
|
|
162584
|
-
if (
|
|
162583
|
+
const node = getAdjustedNode(startingToken);
|
|
162584
|
+
if (node === void 0)
|
|
162585
|
+
return void 0;
|
|
162586
|
+
const info = getContextualSignatureLocationInfo(node, sourceFile, position, checker);
|
|
162587
|
+
if (info === void 0)
|
|
162585
162588
|
return void 0;
|
|
162586
162589
|
const { contextualType, argumentIndex, argumentCount, argumentsSpan } = info;
|
|
162587
162590
|
const nonNullableContextualType = contextualType.getNonNullableType();
|
|
@@ -162594,16 +162597,23 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162594
162597
|
const invocation = { kind: 2 /* Contextual */, signature, node: startingToken, symbol: chooseBetterSymbol(symbol) };
|
|
162595
162598
|
return { isTypeParameterList: false, invocation, argumentsSpan, argumentIndex, argumentCount };
|
|
162596
162599
|
}
|
|
162597
|
-
function
|
|
162598
|
-
|
|
162599
|
-
|
|
162600
|
-
|
|
162600
|
+
function getAdjustedNode(node) {
|
|
162601
|
+
switch (node.kind) {
|
|
162602
|
+
case 20 /* OpenParenToken */:
|
|
162603
|
+
case 27 /* CommaToken */:
|
|
162604
|
+
return node;
|
|
162605
|
+
default:
|
|
162606
|
+
return findAncestor(node.parent, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern(n) || isArrayBindingPattern(n) ? false : "quit");
|
|
162607
|
+
}
|
|
162608
|
+
}
|
|
162609
|
+
function getContextualSignatureLocationInfo(node, sourceFile, position, checker) {
|
|
162610
|
+
const { parent: parent2 } = node;
|
|
162601
162611
|
switch (parent2.kind) {
|
|
162602
162612
|
case 215 /* ParenthesizedExpression */:
|
|
162603
162613
|
case 172 /* MethodDeclaration */:
|
|
162604
162614
|
case 216 /* FunctionExpression */:
|
|
162605
162615
|
case 217 /* ArrowFunction */:
|
|
162606
|
-
const info = getArgumentOrParameterListInfo(
|
|
162616
|
+
const info = getArgumentOrParameterListInfo(node, position, sourceFile);
|
|
162607
162617
|
if (!info)
|
|
162608
162618
|
return void 0;
|
|
162609
162619
|
const { argumentIndex, argumentCount, argumentsSpan } = info;
|
|
@@ -162612,7 +162622,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162612
162622
|
case 224 /* BinaryExpression */: {
|
|
162613
162623
|
const highestBinary = getHighestBinary(parent2);
|
|
162614
162624
|
const contextualType2 = checker.getContextualType(highestBinary);
|
|
162615
|
-
const argumentIndex2 =
|
|
162625
|
+
const argumentIndex2 = node.kind === 20 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1;
|
|
162616
162626
|
const argumentCount2 = countBinaryExpressionParameters(highestBinary);
|
|
162617
162627
|
return contextualType2 && { contextualType: contextualType2, argumentIndex: argumentIndex2, argumentCount: argumentCount2, argumentsSpan: createTextSpanFromNode(parent2) };
|
|
162618
162628
|
}
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.1";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20230404`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.1.0-dev.
|
|
5
|
+
"version": "5.1.0-dev.20230404",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"node": "14.21.1",
|
|
114
114
|
"npm": "8.19.3"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "a280cafbf85df16bcd2f7258f26fdb85615b3c41"
|
|
117
117
|
}
|