typescript 5.1.0-dev.20230403 → 5.1.0-dev.20230405
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 +9 -1
- package/lib/tsserver.js +313 -14
- package/lib/tsserverlibrary.js +313 -14
- package/lib/typescript.js +313 -14
- 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.20230405`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -80351,6 +80351,14 @@ function createTypeChecker(host) {
|
|
|
80351
80351
|
const symbol = getSymbolAtLocation(node);
|
|
80352
80352
|
return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType;
|
|
80353
80353
|
}
|
|
80354
|
+
if (isBindingElement(node)) {
|
|
80355
|
+
return getTypeForVariableLikeDeclaration(
|
|
80356
|
+
node,
|
|
80357
|
+
/*includeOptionality*/
|
|
80358
|
+
true,
|
|
80359
|
+
0 /* Normal */
|
|
80360
|
+
) || errorType;
|
|
80361
|
+
}
|
|
80354
80362
|
if (isDeclaration(node)) {
|
|
80355
80363
|
const symbol = getSymbolOfDeclaration(node);
|
|
80356
80364
|
return symbol ? getTypeOfSymbol(symbol) : errorType;
|
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.20230405`;
|
|
2296
2296
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2297
2297
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2298
2298
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -84999,6 +84999,14 @@ function createTypeChecker(host) {
|
|
|
84999
84999
|
const symbol = getSymbolAtLocation(node);
|
|
85000
85000
|
return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType;
|
|
85001
85001
|
}
|
|
85002
|
+
if (isBindingElement(node)) {
|
|
85003
|
+
return getTypeForVariableLikeDeclaration(
|
|
85004
|
+
node,
|
|
85005
|
+
/*includeOptionality*/
|
|
85006
|
+
true,
|
|
85007
|
+
0 /* Normal */
|
|
85008
|
+
) || errorType;
|
|
85009
|
+
}
|
|
85002
85010
|
if (isDeclaration(node)) {
|
|
85003
85011
|
const symbol = getSymbolOfDeclaration(node);
|
|
85004
85012
|
return symbol ? getTypeOfSymbol(symbol) : errorType;
|
|
@@ -149063,6 +149071,7 @@ function getCompletionsAtPosition(host, program, log, sourceFile, position, pref
|
|
|
149063
149071
|
return void 0;
|
|
149064
149072
|
}
|
|
149065
149073
|
const compilerOptions = program.getCompilerOptions();
|
|
149074
|
+
const checker = program.getTypeChecker();
|
|
149066
149075
|
const incompleteCompletionsCache = preferences.allowIncompleteCompletions ? (_a2 = host.getIncompleteCompletionsCache) == null ? void 0 : _a2.call(host) : void 0;
|
|
149067
149076
|
if (incompleteCompletionsCache && completionKind === 3 /* TriggerForIncompleteCompletions */ && previousToken && isIdentifier(previousToken)) {
|
|
149068
149077
|
const incompleteContinuation = continuePreviousIncompleteResponse(incompleteCompletionsCache, sourceFile, previousToken, program, host, preferences, cancellationToken, position);
|
|
@@ -149103,9 +149112,31 @@ function getCompletionsAtPosition(host, program, log, sourceFile, position, pref
|
|
|
149103
149112
|
}
|
|
149104
149113
|
return response;
|
|
149105
149114
|
case 1 /* JsDocTagName */:
|
|
149106
|
-
return jsdocCompletionInfo(
|
|
149115
|
+
return jsdocCompletionInfo([
|
|
149116
|
+
...ts_JsDoc_exports.getJSDocTagNameCompletions(),
|
|
149117
|
+
...getJSDocParameterCompletions(
|
|
149118
|
+
sourceFile,
|
|
149119
|
+
position,
|
|
149120
|
+
checker,
|
|
149121
|
+
compilerOptions,
|
|
149122
|
+
preferences,
|
|
149123
|
+
/*tagNameOnly*/
|
|
149124
|
+
true
|
|
149125
|
+
)
|
|
149126
|
+
]);
|
|
149107
149127
|
case 2 /* JsDocTag */:
|
|
149108
|
-
return jsdocCompletionInfo(
|
|
149128
|
+
return jsdocCompletionInfo([
|
|
149129
|
+
...ts_JsDoc_exports.getJSDocTagCompletions(),
|
|
149130
|
+
...getJSDocParameterCompletions(
|
|
149131
|
+
sourceFile,
|
|
149132
|
+
position,
|
|
149133
|
+
checker,
|
|
149134
|
+
compilerOptions,
|
|
149135
|
+
preferences,
|
|
149136
|
+
/*tagNameOnly*/
|
|
149137
|
+
false
|
|
149138
|
+
)
|
|
149139
|
+
]);
|
|
149109
149140
|
case 3 /* JsDocParameterName */:
|
|
149110
149141
|
return jsdocCompletionInfo(ts_JsDoc_exports.getJSDocParameterNameCompletions(completionData.tag));
|
|
149111
149142
|
case 4 /* Keywords */:
|
|
@@ -149193,6 +149224,264 @@ function continuePreviousIncompleteResponse(cache, file, location, program, host
|
|
|
149193
149224
|
function jsdocCompletionInfo(entries) {
|
|
149194
149225
|
return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries };
|
|
149195
149226
|
}
|
|
149227
|
+
function getJSDocParameterCompletions(sourceFile, position, checker, options, preferences, tagNameOnly) {
|
|
149228
|
+
const currentToken = getTokenAtPosition(sourceFile, position);
|
|
149229
|
+
if (!isJSDocTag(currentToken) && !isJSDoc(currentToken)) {
|
|
149230
|
+
return [];
|
|
149231
|
+
}
|
|
149232
|
+
const jsDoc = isJSDoc(currentToken) ? currentToken : currentToken.parent;
|
|
149233
|
+
if (!isJSDoc(jsDoc)) {
|
|
149234
|
+
return [];
|
|
149235
|
+
}
|
|
149236
|
+
const func = jsDoc.parent;
|
|
149237
|
+
if (!isFunctionLike(func)) {
|
|
149238
|
+
return [];
|
|
149239
|
+
}
|
|
149240
|
+
const isJs = isSourceFileJS(sourceFile);
|
|
149241
|
+
const isSnippet = preferences.includeCompletionsWithSnippetText || void 0;
|
|
149242
|
+
const paramTagCount = countWhere(jsDoc.tags, (tag) => isJSDocParameterTag(tag) && tag.getEnd() <= position);
|
|
149243
|
+
return mapDefined(func.parameters, (param) => {
|
|
149244
|
+
if (getJSDocParameterTags(param).length) {
|
|
149245
|
+
return void 0;
|
|
149246
|
+
}
|
|
149247
|
+
if (isIdentifier(param.name)) {
|
|
149248
|
+
const tabstopCounter = { tabstop: 1 };
|
|
149249
|
+
const paramName = param.name.text;
|
|
149250
|
+
let displayText = getJSDocParamAnnotation(
|
|
149251
|
+
paramName,
|
|
149252
|
+
param.initializer,
|
|
149253
|
+
param.dotDotDotToken,
|
|
149254
|
+
isJs,
|
|
149255
|
+
/*isObject*/
|
|
149256
|
+
false,
|
|
149257
|
+
/*isSnippet*/
|
|
149258
|
+
false,
|
|
149259
|
+
checker,
|
|
149260
|
+
options,
|
|
149261
|
+
preferences
|
|
149262
|
+
);
|
|
149263
|
+
let snippetText = isSnippet ? getJSDocParamAnnotation(
|
|
149264
|
+
paramName,
|
|
149265
|
+
param.initializer,
|
|
149266
|
+
param.dotDotDotToken,
|
|
149267
|
+
isJs,
|
|
149268
|
+
/*isObject*/
|
|
149269
|
+
false,
|
|
149270
|
+
/*isSnippet*/
|
|
149271
|
+
true,
|
|
149272
|
+
checker,
|
|
149273
|
+
options,
|
|
149274
|
+
preferences,
|
|
149275
|
+
tabstopCounter
|
|
149276
|
+
) : void 0;
|
|
149277
|
+
if (tagNameOnly) {
|
|
149278
|
+
displayText = displayText.slice(1);
|
|
149279
|
+
if (snippetText)
|
|
149280
|
+
snippetText = snippetText.slice(1);
|
|
149281
|
+
}
|
|
149282
|
+
return {
|
|
149283
|
+
name: displayText,
|
|
149284
|
+
kind: "parameter" /* parameterElement */,
|
|
149285
|
+
sortText: SortText.LocationPriority,
|
|
149286
|
+
insertText: isSnippet ? snippetText : void 0,
|
|
149287
|
+
isSnippet
|
|
149288
|
+
};
|
|
149289
|
+
} else if (param.parent.parameters.indexOf(param) === paramTagCount) {
|
|
149290
|
+
const paramPath = `param${paramTagCount}`;
|
|
149291
|
+
const displayTextResult = generateJSDocParamTagsForDestructuring(
|
|
149292
|
+
paramPath,
|
|
149293
|
+
param.name,
|
|
149294
|
+
param.initializer,
|
|
149295
|
+
param.dotDotDotToken,
|
|
149296
|
+
isJs,
|
|
149297
|
+
/*isSnippet*/
|
|
149298
|
+
false,
|
|
149299
|
+
checker,
|
|
149300
|
+
options,
|
|
149301
|
+
preferences
|
|
149302
|
+
);
|
|
149303
|
+
const snippetTextResult = isSnippet ? generateJSDocParamTagsForDestructuring(
|
|
149304
|
+
paramPath,
|
|
149305
|
+
param.name,
|
|
149306
|
+
param.initializer,
|
|
149307
|
+
param.dotDotDotToken,
|
|
149308
|
+
isJs,
|
|
149309
|
+
/*isSnippet*/
|
|
149310
|
+
true,
|
|
149311
|
+
checker,
|
|
149312
|
+
options,
|
|
149313
|
+
preferences
|
|
149314
|
+
) : void 0;
|
|
149315
|
+
let displayText = displayTextResult.join(getNewLineCharacter(options) + "* ");
|
|
149316
|
+
let snippetText = snippetTextResult == null ? void 0 : snippetTextResult.join(getNewLineCharacter(options) + "* ");
|
|
149317
|
+
if (tagNameOnly) {
|
|
149318
|
+
displayText = displayText.slice(1);
|
|
149319
|
+
if (snippetText)
|
|
149320
|
+
snippetText = snippetText.slice(1);
|
|
149321
|
+
}
|
|
149322
|
+
return {
|
|
149323
|
+
name: displayText,
|
|
149324
|
+
kind: "parameter" /* parameterElement */,
|
|
149325
|
+
sortText: SortText.LocationPriority,
|
|
149326
|
+
insertText: isSnippet ? snippetText : void 0,
|
|
149327
|
+
isSnippet
|
|
149328
|
+
};
|
|
149329
|
+
}
|
|
149330
|
+
});
|
|
149331
|
+
}
|
|
149332
|
+
function generateJSDocParamTagsForDestructuring(path, pattern, initializer, dotDotDotToken, isJs, isSnippet, checker, options, preferences) {
|
|
149333
|
+
if (!isJs) {
|
|
149334
|
+
return [
|
|
149335
|
+
getJSDocParamAnnotation(
|
|
149336
|
+
path,
|
|
149337
|
+
initializer,
|
|
149338
|
+
dotDotDotToken,
|
|
149339
|
+
isJs,
|
|
149340
|
+
/*isObject*/
|
|
149341
|
+
false,
|
|
149342
|
+
isSnippet,
|
|
149343
|
+
checker,
|
|
149344
|
+
options,
|
|
149345
|
+
preferences,
|
|
149346
|
+
{ tabstop: 1 }
|
|
149347
|
+
)
|
|
149348
|
+
];
|
|
149349
|
+
}
|
|
149350
|
+
return patternWorker(path, pattern, initializer, dotDotDotToken, { tabstop: 1 });
|
|
149351
|
+
function patternWorker(path2, pattern2, initializer2, dotDotDotToken2, counter) {
|
|
149352
|
+
if (isObjectBindingPattern(pattern2) && !dotDotDotToken2) {
|
|
149353
|
+
const oldTabstop = counter.tabstop;
|
|
149354
|
+
const childCounter = { tabstop: oldTabstop };
|
|
149355
|
+
const rootParam = getJSDocParamAnnotation(
|
|
149356
|
+
path2,
|
|
149357
|
+
initializer2,
|
|
149358
|
+
dotDotDotToken2,
|
|
149359
|
+
isJs,
|
|
149360
|
+
/*isObject*/
|
|
149361
|
+
true,
|
|
149362
|
+
isSnippet,
|
|
149363
|
+
checker,
|
|
149364
|
+
options,
|
|
149365
|
+
preferences,
|
|
149366
|
+
childCounter
|
|
149367
|
+
);
|
|
149368
|
+
let childTags = [];
|
|
149369
|
+
for (const element of pattern2.elements) {
|
|
149370
|
+
const elementTags = elementWorker(path2, element, childCounter);
|
|
149371
|
+
if (!elementTags) {
|
|
149372
|
+
childTags = void 0;
|
|
149373
|
+
break;
|
|
149374
|
+
} else {
|
|
149375
|
+
childTags.push(...elementTags);
|
|
149376
|
+
}
|
|
149377
|
+
}
|
|
149378
|
+
if (childTags) {
|
|
149379
|
+
counter.tabstop = childCounter.tabstop;
|
|
149380
|
+
return [rootParam, ...childTags];
|
|
149381
|
+
}
|
|
149382
|
+
}
|
|
149383
|
+
return [
|
|
149384
|
+
getJSDocParamAnnotation(
|
|
149385
|
+
path2,
|
|
149386
|
+
initializer2,
|
|
149387
|
+
dotDotDotToken2,
|
|
149388
|
+
isJs,
|
|
149389
|
+
/*isObject*/
|
|
149390
|
+
false,
|
|
149391
|
+
isSnippet,
|
|
149392
|
+
checker,
|
|
149393
|
+
options,
|
|
149394
|
+
preferences,
|
|
149395
|
+
counter
|
|
149396
|
+
)
|
|
149397
|
+
];
|
|
149398
|
+
}
|
|
149399
|
+
function elementWorker(path2, element, counter) {
|
|
149400
|
+
if (!element.propertyName && isIdentifier(element.name) || isIdentifier(element.name)) {
|
|
149401
|
+
const propertyName = element.propertyName ? tryGetTextOfPropertyName(element.propertyName) : element.name.text;
|
|
149402
|
+
if (!propertyName) {
|
|
149403
|
+
return void 0;
|
|
149404
|
+
}
|
|
149405
|
+
const paramName = `${path2}.${propertyName}`;
|
|
149406
|
+
return [
|
|
149407
|
+
getJSDocParamAnnotation(
|
|
149408
|
+
paramName,
|
|
149409
|
+
element.initializer,
|
|
149410
|
+
element.dotDotDotToken,
|
|
149411
|
+
isJs,
|
|
149412
|
+
/*isObject*/
|
|
149413
|
+
false,
|
|
149414
|
+
isSnippet,
|
|
149415
|
+
checker,
|
|
149416
|
+
options,
|
|
149417
|
+
preferences,
|
|
149418
|
+
counter
|
|
149419
|
+
)
|
|
149420
|
+
];
|
|
149421
|
+
} else if (element.propertyName) {
|
|
149422
|
+
const propertyName = tryGetTextOfPropertyName(element.propertyName);
|
|
149423
|
+
return propertyName && patternWorker(`${path2}.${propertyName}`, element.name, element.initializer, element.dotDotDotToken, counter);
|
|
149424
|
+
}
|
|
149425
|
+
return void 0;
|
|
149426
|
+
}
|
|
149427
|
+
}
|
|
149428
|
+
function getJSDocParamAnnotation(paramName, initializer, dotDotDotToken, isJs, isObject, isSnippet, checker, options, preferences, tabstopCounter) {
|
|
149429
|
+
if (isSnippet) {
|
|
149430
|
+
Debug.assertIsDefined(tabstopCounter);
|
|
149431
|
+
}
|
|
149432
|
+
if (initializer) {
|
|
149433
|
+
paramName = getJSDocParamNameWithInitializer(paramName, initializer);
|
|
149434
|
+
}
|
|
149435
|
+
if (isSnippet) {
|
|
149436
|
+
paramName = escapeSnippetText(paramName);
|
|
149437
|
+
}
|
|
149438
|
+
if (isJs) {
|
|
149439
|
+
let type = "*";
|
|
149440
|
+
if (isObject) {
|
|
149441
|
+
Debug.assert(!dotDotDotToken, `Cannot annotate a rest parameter with type 'Object'.`);
|
|
149442
|
+
type = "Object";
|
|
149443
|
+
} else {
|
|
149444
|
+
if (initializer) {
|
|
149445
|
+
const inferredType = checker.getTypeAtLocation(initializer.parent);
|
|
149446
|
+
if (!(inferredType.flags & (1 /* Any */ | 16384 /* Void */))) {
|
|
149447
|
+
const sourceFile = initializer.getSourceFile();
|
|
149448
|
+
const quotePreference = getQuotePreference(sourceFile, preferences);
|
|
149449
|
+
const builderFlags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */;
|
|
149450
|
+
const typeNode = checker.typeToTypeNode(inferredType, findAncestor(initializer, isFunctionLike), builderFlags);
|
|
149451
|
+
if (typeNode) {
|
|
149452
|
+
const printer = isSnippet ? createSnippetPrinter({
|
|
149453
|
+
removeComments: true,
|
|
149454
|
+
module: options.module,
|
|
149455
|
+
target: options.target
|
|
149456
|
+
}) : createPrinter({
|
|
149457
|
+
removeComments: true,
|
|
149458
|
+
module: options.module,
|
|
149459
|
+
target: options.target
|
|
149460
|
+
});
|
|
149461
|
+
setEmitFlags(typeNode, 1 /* SingleLine */);
|
|
149462
|
+
type = printer.printNode(4 /* Unspecified */, typeNode, sourceFile);
|
|
149463
|
+
}
|
|
149464
|
+
}
|
|
149465
|
+
}
|
|
149466
|
+
if (isSnippet && type === "*") {
|
|
149467
|
+
type = `\${${tabstopCounter.tabstop++}:${type}}`;
|
|
149468
|
+
}
|
|
149469
|
+
}
|
|
149470
|
+
const dotDotDot = !isObject && dotDotDotToken ? "..." : "";
|
|
149471
|
+
const description2 = isSnippet ? `\${${tabstopCounter.tabstop++}}` : "";
|
|
149472
|
+
return `@param {${dotDotDot}${type}} ${paramName} ${description2}`;
|
|
149473
|
+
} else {
|
|
149474
|
+
const description2 = isSnippet ? `\${${tabstopCounter.tabstop++}}` : "";
|
|
149475
|
+
return `@param ${paramName} ${description2}`;
|
|
149476
|
+
}
|
|
149477
|
+
}
|
|
149478
|
+
function getJSDocParamNameWithInitializer(paramName, initializer) {
|
|
149479
|
+
const initializerText = initializer.getText().trim();
|
|
149480
|
+
if (initializerText.includes("\n") || initializerText.length > 80) {
|
|
149481
|
+
return `[${paramName}]`;
|
|
149482
|
+
}
|
|
149483
|
+
return `[${paramName}=${initializerText}]`;
|
|
149484
|
+
}
|
|
149196
149485
|
function keywordToCompletionEntry(keyword) {
|
|
149197
149486
|
return {
|
|
149198
149487
|
name: tokenToString(keyword),
|
|
@@ -154260,7 +154549,7 @@ var Core;
|
|
|
154260
154549
|
((Core2) => {
|
|
154261
154550
|
function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {
|
|
154262
154551
|
var _a2, _b, _c;
|
|
154263
|
-
node =
|
|
154552
|
+
node = getAdjustedNode2(node, options);
|
|
154264
154553
|
if (isSourceFile(node)) {
|
|
154265
154554
|
const resolvedRef = ts_GoToDefinition_exports.getReferenceAtPosition(node, position, program);
|
|
154266
154555
|
if (!(resolvedRef == null ? void 0 : resolvedRef.file)) {
|
|
@@ -154328,7 +154617,7 @@ var Core;
|
|
|
154328
154617
|
return mergeReferences(program, moduleReferences, references, moduleReferencesOfExportTarget);
|
|
154329
154618
|
}
|
|
154330
154619
|
Core2.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
|
|
154331
|
-
function
|
|
154620
|
+
function getAdjustedNode2(node, options) {
|
|
154332
154621
|
if (options.use === 1 /* References */) {
|
|
154333
154622
|
node = getAdjustedReferenceLocation(node);
|
|
154334
154623
|
} else if (options.use === 2 /* Rename */) {
|
|
@@ -154336,7 +154625,7 @@ var Core;
|
|
|
154336
154625
|
}
|
|
154337
154626
|
return node;
|
|
154338
154627
|
}
|
|
154339
|
-
Core2.getAdjustedNode =
|
|
154628
|
+
Core2.getAdjustedNode = getAdjustedNode2;
|
|
154340
154629
|
function getReferencesForFileName(fileName, program, sourceFiles, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {
|
|
154341
154630
|
var _a2, _b;
|
|
154342
154631
|
const moduleSymbol = (_a2 = program.getSourceFile(fileName)) == null ? void 0 : _a2.symbol;
|
|
@@ -163150,8 +163439,11 @@ function countBinaryExpressionParameters(b) {
|
|
|
163150
163439
|
return isBinaryExpression(b.left) ? countBinaryExpressionParameters(b.left) + 1 : 2;
|
|
163151
163440
|
}
|
|
163152
163441
|
function tryGetParameterInfo(startingToken, position, sourceFile, checker) {
|
|
163153
|
-
const
|
|
163154
|
-
if (
|
|
163442
|
+
const node = getAdjustedNode(startingToken);
|
|
163443
|
+
if (node === void 0)
|
|
163444
|
+
return void 0;
|
|
163445
|
+
const info = getContextualSignatureLocationInfo(node, sourceFile, position, checker);
|
|
163446
|
+
if (info === void 0)
|
|
163155
163447
|
return void 0;
|
|
163156
163448
|
const { contextualType, argumentIndex, argumentCount, argumentsSpan } = info;
|
|
163157
163449
|
const nonNullableContextualType = contextualType.getNonNullableType();
|
|
@@ -163164,16 +163456,23 @@ function tryGetParameterInfo(startingToken, position, sourceFile, checker) {
|
|
|
163164
163456
|
const invocation = { kind: 2 /* Contextual */, signature, node: startingToken, symbol: chooseBetterSymbol(symbol) };
|
|
163165
163457
|
return { isTypeParameterList: false, invocation, argumentsSpan, argumentIndex, argumentCount };
|
|
163166
163458
|
}
|
|
163167
|
-
function
|
|
163168
|
-
|
|
163169
|
-
|
|
163170
|
-
|
|
163459
|
+
function getAdjustedNode(node) {
|
|
163460
|
+
switch (node.kind) {
|
|
163461
|
+
case 20 /* OpenParenToken */:
|
|
163462
|
+
case 27 /* CommaToken */:
|
|
163463
|
+
return node;
|
|
163464
|
+
default:
|
|
163465
|
+
return findAncestor(node.parent, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern(n) || isArrayBindingPattern(n) ? false : "quit");
|
|
163466
|
+
}
|
|
163467
|
+
}
|
|
163468
|
+
function getContextualSignatureLocationInfo(node, sourceFile, position, checker) {
|
|
163469
|
+
const { parent: parent2 } = node;
|
|
163171
163470
|
switch (parent2.kind) {
|
|
163172
163471
|
case 215 /* ParenthesizedExpression */:
|
|
163173
163472
|
case 172 /* MethodDeclaration */:
|
|
163174
163473
|
case 216 /* FunctionExpression */:
|
|
163175
163474
|
case 217 /* ArrowFunction */:
|
|
163176
|
-
const info = getArgumentOrParameterListInfo(
|
|
163475
|
+
const info = getArgumentOrParameterListInfo(node, position, sourceFile);
|
|
163177
163476
|
if (!info)
|
|
163178
163477
|
return void 0;
|
|
163179
163478
|
const { argumentIndex, argumentCount, argumentsSpan } = info;
|
|
@@ -163182,7 +163481,7 @@ function getContextualSignatureLocationInfo(startingToken, sourceFile, position,
|
|
|
163182
163481
|
case 224 /* BinaryExpression */: {
|
|
163183
163482
|
const highestBinary = getHighestBinary(parent2);
|
|
163184
163483
|
const contextualType2 = checker.getContextualType(highestBinary);
|
|
163185
|
-
const argumentIndex2 =
|
|
163484
|
+
const argumentIndex2 = node.kind === 20 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1;
|
|
163186
163485
|
const argumentCount2 = countBinaryExpressionParameters(highestBinary);
|
|
163187
163486
|
return contextualType2 && { contextualType: contextualType2, argumentIndex: argumentIndex2, argumentCount: argumentCount2, argumentsSpan: createTextSpanFromNode(parent2) };
|
|
163188
163487
|
}
|