typescript 5.0.0-dev.20230113 → 5.0.0-dev.20230114
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.es2023.array.d.ts +344 -0
- package/lib/lib.es2023.d.ts +22 -0
- package/lib/lib.es2023.full.d.ts +25 -0
- package/lib/lib.esnext.d.ts +1 -1
- package/lib/tsc.js +10 -5
- package/lib/tsserver.js +15 -10
- package/lib/tsserverlibrary.js +15 -10
- package/lib/typescript.js +15 -10
- package/lib/typingsInstaller.js +4 -2
- package/package.json +1 -1
|
@@ -0,0 +1,344 @@
|
|
|
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"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
interface Array<T> {
|
|
22
|
+
/**
|
|
23
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
24
|
+
* otherwise.
|
|
25
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
26
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
27
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
28
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
29
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
30
|
+
*/
|
|
31
|
+
findLast<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined;
|
|
32
|
+
findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
36
|
+
* otherwise.
|
|
37
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
38
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
39
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
40
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
41
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
42
|
+
*/
|
|
43
|
+
findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface ReadonlyArray<T> {
|
|
47
|
+
/**
|
|
48
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
49
|
+
* otherwise.
|
|
50
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
51
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
52
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
53
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
54
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
55
|
+
*/
|
|
56
|
+
findLast<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S | undefined;
|
|
57
|
+
findLast(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T | undefined;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
61
|
+
* otherwise.
|
|
62
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
63
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
64
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
65
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
66
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
67
|
+
*/
|
|
68
|
+
findLastIndex(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
interface Int8Array {
|
|
72
|
+
/**
|
|
73
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
74
|
+
* otherwise.
|
|
75
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
76
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
77
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
78
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
79
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
80
|
+
*/
|
|
81
|
+
findLast<S extends number>(predicate: (value: number, index: number, array: Int8Array) => value is S, thisArg?: any): S | undefined;
|
|
82
|
+
findLast(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number | undefined;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
86
|
+
* otherwise.
|
|
87
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
88
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
89
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
90
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
91
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
92
|
+
*/
|
|
93
|
+
findLastIndex(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
interface Uint8Array {
|
|
97
|
+
/**
|
|
98
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
99
|
+
* otherwise.
|
|
100
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
101
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
102
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
103
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
104
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
105
|
+
*/
|
|
106
|
+
findLast<S extends number>(predicate: (value: number, index: number, array: Uint8Array) => value is S, thisArg?: any): S | undefined;
|
|
107
|
+
findLast(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number | undefined;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
111
|
+
* otherwise.
|
|
112
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
113
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
114
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
115
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
116
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
117
|
+
*/
|
|
118
|
+
findLastIndex(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
interface Uint8ClampedArray {
|
|
122
|
+
/**
|
|
123
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
124
|
+
* otherwise.
|
|
125
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
126
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
127
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
128
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
129
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
130
|
+
*/
|
|
131
|
+
findLast<S extends number>(predicate: (value: number, index: number, array: Uint8ClampedArray) => value is S, thisArg?: any): S | undefined;
|
|
132
|
+
findLast(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): number | undefined;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
136
|
+
* otherwise.
|
|
137
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
138
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
139
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
140
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
141
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
142
|
+
*/
|
|
143
|
+
findLastIndex(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): number;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
interface Int16Array {
|
|
147
|
+
/**
|
|
148
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
149
|
+
* otherwise.
|
|
150
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
151
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
152
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
153
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
154
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
155
|
+
*/
|
|
156
|
+
findLast<S extends number>(predicate: (value: number, index: number, array: Int16Array) => value is S, thisArg?: any): S | undefined;
|
|
157
|
+
findLast(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number | undefined;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
161
|
+
* otherwise.
|
|
162
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
163
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
164
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
165
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
166
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
167
|
+
*/
|
|
168
|
+
findLastIndex(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
interface Uint16Array {
|
|
172
|
+
/**
|
|
173
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
174
|
+
* otherwise.
|
|
175
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
176
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
177
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
178
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
179
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
180
|
+
*/
|
|
181
|
+
findLast<S extends number>(predicate: (value: number, index: number, array: Uint16Array) => value is S, thisArg?: any): S | undefined;
|
|
182
|
+
findLast(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number | undefined;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
186
|
+
* otherwise.
|
|
187
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
188
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
189
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
190
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
191
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
192
|
+
*/
|
|
193
|
+
findLastIndex(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
interface Int32Array {
|
|
197
|
+
/**
|
|
198
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
199
|
+
* otherwise.
|
|
200
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
201
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
202
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
203
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
204
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
205
|
+
*/
|
|
206
|
+
findLast<S extends number>(predicate: (value: number, index: number, array: Int32Array) => value is S, thisArg?: any): S | undefined;
|
|
207
|
+
findLast(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number | undefined;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
211
|
+
* otherwise.
|
|
212
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
213
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
214
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
215
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
216
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
217
|
+
*/
|
|
218
|
+
findLastIndex(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
interface Uint32Array {
|
|
222
|
+
/**
|
|
223
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
224
|
+
* otherwise.
|
|
225
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
226
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
227
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
228
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
229
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
230
|
+
*/
|
|
231
|
+
findLast<S extends number>(predicate: (value: number, index: number, array: Uint32Array) => value is S, thisArg?: any): S | undefined;
|
|
232
|
+
findLast(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number | undefined;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
236
|
+
* otherwise.
|
|
237
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
238
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
239
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
240
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
241
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
242
|
+
*/
|
|
243
|
+
findLastIndex(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
interface Float32Array {
|
|
247
|
+
/**
|
|
248
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
249
|
+
* otherwise.
|
|
250
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
251
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
252
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
253
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
254
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
255
|
+
*/
|
|
256
|
+
findLast<S extends number>(predicate: (value: number, index: number, array: Float32Array) => value is S, thisArg?: any): S | undefined;
|
|
257
|
+
findLast(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number | undefined;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
261
|
+
* otherwise.
|
|
262
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
263
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
264
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
265
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
266
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
267
|
+
*/
|
|
268
|
+
findLastIndex(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
interface Float64Array {
|
|
272
|
+
/**
|
|
273
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
274
|
+
* otherwise.
|
|
275
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
276
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
277
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
278
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
279
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
280
|
+
*/
|
|
281
|
+
findLast<S extends number>(predicate: (value: number, index: number, array: Float64Array) => value is S, thisArg?: any): S | undefined;
|
|
282
|
+
findLast(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number | undefined;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
286
|
+
* otherwise.
|
|
287
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
288
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
289
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
290
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
291
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
292
|
+
*/
|
|
293
|
+
findLastIndex(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
interface BigInt64Array {
|
|
297
|
+
/**
|
|
298
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
299
|
+
* otherwise.
|
|
300
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
301
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
302
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
303
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
304
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
305
|
+
*/
|
|
306
|
+
findLast<S extends bigint>(predicate: (value: bigint, index: number, array: BigInt64Array) => value is S, thisArg?: any): S | undefined;
|
|
307
|
+
findLast(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): bigint | undefined;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
311
|
+
* otherwise.
|
|
312
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
313
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
314
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
315
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
316
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
317
|
+
*/
|
|
318
|
+
findLastIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): number;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
interface BigUint64Array {
|
|
322
|
+
/**
|
|
323
|
+
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
324
|
+
* otherwise.
|
|
325
|
+
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
326
|
+
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
327
|
+
* immediately returns that element value. Otherwise, findLast returns undefined.
|
|
328
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
329
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
330
|
+
*/
|
|
331
|
+
findLast<S extends bigint>(predicate: (value: bigint, index: number, array: BigUint64Array) => value is S, thisArg?: any): S | undefined;
|
|
332
|
+
findLast(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): bigint | undefined;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
336
|
+
* otherwise.
|
|
337
|
+
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
338
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
339
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
340
|
+
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
341
|
+
* predicate. If it is not provided, undefined is used instead.
|
|
342
|
+
*/
|
|
343
|
+
findLastIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): number;
|
|
344
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/// <reference lib="es2022" />
|
|
22
|
+
/// <reference lib="es2023.array" />
|
|
@@ -0,0 +1,25 @@
|
|
|
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"/>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/// <reference lib="es2023" />
|
|
22
|
+
/// <reference lib="dom" />
|
|
23
|
+
/// <reference lib="webworker.importscripts" />
|
|
24
|
+
/// <reference lib="scripthost" />
|
|
25
|
+
/// <reference lib="dom.iterable" />
|
package/lib/lib.esnext.d.ts
CHANGED
package/lib/tsc.js
CHANGED
|
@@ -23,7 +23,7 @@ var __export = (target, all) => {
|
|
|
23
23
|
|
|
24
24
|
// src/compiler/corePublic.ts
|
|
25
25
|
var versionMajorMinor = "5.0";
|
|
26
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
26
|
+
var version = `${versionMajorMinor}.0-dev.20230114`;
|
|
27
27
|
|
|
28
28
|
// src/compiler/core.ts
|
|
29
29
|
var emptyArray = [];
|
|
@@ -32275,6 +32275,7 @@ var libEntries = [
|
|
|
32275
32275
|
["es2020", "lib.es2020.d.ts"],
|
|
32276
32276
|
["es2021", "lib.es2021.d.ts"],
|
|
32277
32277
|
["es2022", "lib.es2022.d.ts"],
|
|
32278
|
+
["es2023", "lib.es2023.d.ts"],
|
|
32278
32279
|
["esnext", "lib.esnext.d.ts"],
|
|
32279
32280
|
// Host only
|
|
32280
32281
|
["dom", "lib.dom.d.ts"],
|
|
@@ -32328,7 +32329,8 @@ var libEntries = [
|
|
|
32328
32329
|
["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"],
|
|
32329
32330
|
["es2022.string", "lib.es2022.string.d.ts"],
|
|
32330
32331
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
32331
|
-
["
|
|
32332
|
+
["es2023.array", "lib.es2023.array.d.ts"],
|
|
32333
|
+
["esnext.array", "lib.es2023.array.d.ts"],
|
|
32332
32334
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
32333
32335
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
32334
32336
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
|
@@ -52354,7 +52356,7 @@ function createTypeChecker(host) {
|
|
|
52354
52356
|
}
|
|
52355
52357
|
function isConstTypeVariable(type) {
|
|
52356
52358
|
var _a2;
|
|
52357
|
-
return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
|
|
52359
|
+
return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || isGenericTupleType(type) && findIndex(getTypeArguments(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0 || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
|
|
52358
52360
|
}
|
|
52359
52361
|
function getConstraintOfIndexedAccess(type) {
|
|
52360
52362
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -64270,6 +64272,7 @@ function createTypeChecker(host) {
|
|
|
64270
64272
|
}
|
|
64271
64273
|
}
|
|
64272
64274
|
function getNarrowedTypeOfSymbol(symbol, location) {
|
|
64275
|
+
var _a2;
|
|
64273
64276
|
const type = getTypeOfSymbol(symbol);
|
|
64274
64277
|
const declaration = symbol.valueDeclaration;
|
|
64275
64278
|
if (declaration) {
|
|
@@ -64305,7 +64308,7 @@ function createTypeChecker(host) {
|
|
|
64305
64308
|
if (func.parameters.length >= 2 && isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
|
|
64306
64309
|
const contextualSignature = getContextualSignature(func);
|
|
64307
64310
|
if (contextualSignature && contextualSignature.parameters.length === 1 && signatureHasRestParameter(contextualSignature)) {
|
|
64308
|
-
const restType = getReducedApparentType(getTypeOfSymbol(contextualSignature.parameters[0]));
|
|
64311
|
+
const restType = getReducedApparentType(instantiateType(getTypeOfSymbol(contextualSignature.parameters[0]), (_a2 = getInferenceContext(func)) == null ? void 0 : _a2.nonFixingMapper));
|
|
64309
64312
|
if (restType.flags & 1048576 /* Union */ && everyType(restType, isTupleType) && !isSymbolAssigned(symbol)) {
|
|
64310
64313
|
const narrowedType = getFlowTypeOfReference(
|
|
64311
64314
|
func,
|
|
@@ -65526,7 +65529,9 @@ function createTypeChecker(host) {
|
|
|
65526
65529
|
}
|
|
65527
65530
|
const index = findContextualNode(node);
|
|
65528
65531
|
if (index >= 0) {
|
|
65529
|
-
|
|
65532
|
+
const cached = contextualTypes[index];
|
|
65533
|
+
if (cached || !contextFlags)
|
|
65534
|
+
return cached;
|
|
65530
65535
|
}
|
|
65531
65536
|
const { parent } = node;
|
|
65532
65537
|
switch (parent.kind) {
|
package/lib/tsserver.js
CHANGED
|
@@ -2671,7 +2671,7 @@ __export(ts_server_exports3, {
|
|
|
2671
2671
|
|
|
2672
2672
|
// src/compiler/corePublic.ts
|
|
2673
2673
|
var versionMajorMinor = "5.0";
|
|
2674
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2674
|
+
var version = `${versionMajorMinor}.0-dev.20230114`;
|
|
2675
2675
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2676
2676
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2677
2677
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -36953,6 +36953,7 @@ var libEntries = [
|
|
|
36953
36953
|
["es2020", "lib.es2020.d.ts"],
|
|
36954
36954
|
["es2021", "lib.es2021.d.ts"],
|
|
36955
36955
|
["es2022", "lib.es2022.d.ts"],
|
|
36956
|
+
["es2023", "lib.es2023.d.ts"],
|
|
36956
36957
|
["esnext", "lib.esnext.d.ts"],
|
|
36957
36958
|
// Host only
|
|
36958
36959
|
["dom", "lib.dom.d.ts"],
|
|
@@ -37006,7 +37007,8 @@ var libEntries = [
|
|
|
37006
37007
|
["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"],
|
|
37007
37008
|
["es2022.string", "lib.es2022.string.d.ts"],
|
|
37008
37009
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
37009
|
-
["
|
|
37010
|
+
["es2023.array", "lib.es2023.array.d.ts"],
|
|
37011
|
+
["esnext.array", "lib.es2023.array.d.ts"],
|
|
37010
37012
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
37011
37013
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
37012
37014
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
|
@@ -57280,7 +57282,7 @@ function createTypeChecker(host) {
|
|
|
57280
57282
|
}
|
|
57281
57283
|
function isConstTypeVariable(type) {
|
|
57282
57284
|
var _a2;
|
|
57283
|
-
return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
|
|
57285
|
+
return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || isGenericTupleType(type) && findIndex(getTypeArguments(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0 || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
|
|
57284
57286
|
}
|
|
57285
57287
|
function getConstraintOfIndexedAccess(type) {
|
|
57286
57288
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -69196,6 +69198,7 @@ function createTypeChecker(host) {
|
|
|
69196
69198
|
}
|
|
69197
69199
|
}
|
|
69198
69200
|
function getNarrowedTypeOfSymbol(symbol, location) {
|
|
69201
|
+
var _a2;
|
|
69199
69202
|
const type = getTypeOfSymbol(symbol);
|
|
69200
69203
|
const declaration = symbol.valueDeclaration;
|
|
69201
69204
|
if (declaration) {
|
|
@@ -69231,7 +69234,7 @@ function createTypeChecker(host) {
|
|
|
69231
69234
|
if (func.parameters.length >= 2 && isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
|
|
69232
69235
|
const contextualSignature = getContextualSignature(func);
|
|
69233
69236
|
if (contextualSignature && contextualSignature.parameters.length === 1 && signatureHasRestParameter(contextualSignature)) {
|
|
69234
|
-
const restType = getReducedApparentType(getTypeOfSymbol(contextualSignature.parameters[0]));
|
|
69237
|
+
const restType = getReducedApparentType(instantiateType(getTypeOfSymbol(contextualSignature.parameters[0]), (_a2 = getInferenceContext(func)) == null ? void 0 : _a2.nonFixingMapper));
|
|
69235
69238
|
if (restType.flags & 1048576 /* Union */ && everyType(restType, isTupleType) && !isSymbolAssigned(symbol)) {
|
|
69236
69239
|
const narrowedType = getFlowTypeOfReference(
|
|
69237
69240
|
func,
|
|
@@ -70452,7 +70455,9 @@ function createTypeChecker(host) {
|
|
|
70452
70455
|
}
|
|
70453
70456
|
const index = findContextualNode(node);
|
|
70454
70457
|
if (index >= 0) {
|
|
70455
|
-
|
|
70458
|
+
const cached = contextualTypes[index];
|
|
70459
|
+
if (cached || !contextFlags)
|
|
70460
|
+
return cached;
|
|
70456
70461
|
}
|
|
70457
70462
|
const { parent: parent2 } = node;
|
|
70458
70463
|
switch (parent2.kind) {
|
|
@@ -150017,14 +150022,14 @@ function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken
|
|
|
150017
150022
|
case 27 /* CommaToken */:
|
|
150018
150023
|
return tryCast(contextToken.parent, isObjectTypeDeclaration);
|
|
150019
150024
|
default:
|
|
150020
|
-
if (
|
|
150021
|
-
if (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line
|
|
150025
|
+
if (isObjectTypeDeclaration(location)) {
|
|
150026
|
+
if (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) {
|
|
150022
150027
|
return location;
|
|
150023
150028
|
}
|
|
150024
|
-
|
|
150029
|
+
const isValidKeyword = isClassLike(contextToken.parent.parent) ? isClassMemberCompletionKeyword : isInterfaceOrTypeLiteralCompletionKeyword;
|
|
150030
|
+
return isValidKeyword(contextToken.kind) || contextToken.kind === 41 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword((_a2 = identifierToKeywordKind(contextToken)) != null ? _a2 : 0 /* Unknown */) ? contextToken.parent.parent : void 0;
|
|
150025
150031
|
}
|
|
150026
|
-
|
|
150027
|
-
return isValidKeyword(contextToken.kind) || contextToken.kind === 41 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword((_a2 = identifierToKeywordKind(contextToken)) != null ? _a2 : 0 /* Unknown */) ? contextToken.parent.parent : void 0;
|
|
150032
|
+
return void 0;
|
|
150028
150033
|
}
|
|
150029
150034
|
}
|
|
150030
150035
|
function tryGetTypeLiteralNode(node) {
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -42,7 +42,7 @@ var ts = (() => {
|
|
|
42
42
|
"src/compiler/corePublic.ts"() {
|
|
43
43
|
"use strict";
|
|
44
44
|
versionMajorMinor = "5.0";
|
|
45
|
-
version = `${versionMajorMinor}.0-dev.
|
|
45
|
+
version = `${versionMajorMinor}.0-dev.20230114`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -36252,6 +36252,7 @@ ${lanes.join("\n")}
|
|
|
36252
36252
|
["es2020", "lib.es2020.d.ts"],
|
|
36253
36253
|
["es2021", "lib.es2021.d.ts"],
|
|
36254
36254
|
["es2022", "lib.es2022.d.ts"],
|
|
36255
|
+
["es2023", "lib.es2023.d.ts"],
|
|
36255
36256
|
["esnext", "lib.esnext.d.ts"],
|
|
36256
36257
|
// Host only
|
|
36257
36258
|
["dom", "lib.dom.d.ts"],
|
|
@@ -36305,7 +36306,8 @@ ${lanes.join("\n")}
|
|
|
36305
36306
|
["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"],
|
|
36306
36307
|
["es2022.string", "lib.es2022.string.d.ts"],
|
|
36307
36308
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
36308
|
-
["
|
|
36309
|
+
["es2023.array", "lib.es2023.array.d.ts"],
|
|
36310
|
+
["esnext.array", "lib.es2023.array.d.ts"],
|
|
36309
36311
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
36310
36312
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
36311
36313
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
|
@@ -54713,7 +54715,7 @@ ${lanes.join("\n")}
|
|
|
54713
54715
|
}
|
|
54714
54716
|
function isConstTypeVariable(type) {
|
|
54715
54717
|
var _a2;
|
|
54716
|
-
return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
|
|
54718
|
+
return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || isGenericTupleType(type) && findIndex(getTypeArguments(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0 || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
|
|
54717
54719
|
}
|
|
54718
54720
|
function getConstraintOfIndexedAccess(type) {
|
|
54719
54721
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -66629,6 +66631,7 @@ ${lanes.join("\n")}
|
|
|
66629
66631
|
}
|
|
66630
66632
|
}
|
|
66631
66633
|
function getNarrowedTypeOfSymbol(symbol, location) {
|
|
66634
|
+
var _a2;
|
|
66632
66635
|
const type = getTypeOfSymbol(symbol);
|
|
66633
66636
|
const declaration = symbol.valueDeclaration;
|
|
66634
66637
|
if (declaration) {
|
|
@@ -66664,7 +66667,7 @@ ${lanes.join("\n")}
|
|
|
66664
66667
|
if (func.parameters.length >= 2 && isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
|
|
66665
66668
|
const contextualSignature = getContextualSignature(func);
|
|
66666
66669
|
if (contextualSignature && contextualSignature.parameters.length === 1 && signatureHasRestParameter(contextualSignature)) {
|
|
66667
|
-
const restType = getReducedApparentType(getTypeOfSymbol(contextualSignature.parameters[0]));
|
|
66670
|
+
const restType = getReducedApparentType(instantiateType(getTypeOfSymbol(contextualSignature.parameters[0]), (_a2 = getInferenceContext(func)) == null ? void 0 : _a2.nonFixingMapper));
|
|
66668
66671
|
if (restType.flags & 1048576 /* Union */ && everyType(restType, isTupleType) && !isSymbolAssigned(symbol)) {
|
|
66669
66672
|
const narrowedType = getFlowTypeOfReference(
|
|
66670
66673
|
func,
|
|
@@ -67885,7 +67888,9 @@ ${lanes.join("\n")}
|
|
|
67885
67888
|
}
|
|
67886
67889
|
const index = findContextualNode(node);
|
|
67887
67890
|
if (index >= 0) {
|
|
67888
|
-
|
|
67891
|
+
const cached = contextualTypes[index];
|
|
67892
|
+
if (cached || !contextFlags)
|
|
67893
|
+
return cached;
|
|
67889
67894
|
}
|
|
67890
67895
|
const { parent: parent2 } = node;
|
|
67891
67896
|
switch (parent2.kind) {
|
|
@@ -146035,14 +146040,14 @@ ${lanes.join("\n")}
|
|
|
146035
146040
|
case 27 /* CommaToken */:
|
|
146036
146041
|
return tryCast(contextToken.parent, isObjectTypeDeclaration);
|
|
146037
146042
|
default:
|
|
146038
|
-
if (
|
|
146039
|
-
if (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line
|
|
146043
|
+
if (isObjectTypeDeclaration(location)) {
|
|
146044
|
+
if (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) {
|
|
146040
146045
|
return location;
|
|
146041
146046
|
}
|
|
146042
|
-
|
|
146047
|
+
const isValidKeyword = isClassLike(contextToken.parent.parent) ? isClassMemberCompletionKeyword : isInterfaceOrTypeLiteralCompletionKeyword;
|
|
146048
|
+
return isValidKeyword(contextToken.kind) || contextToken.kind === 41 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword((_a2 = identifierToKeywordKind(contextToken)) != null ? _a2 : 0 /* Unknown */) ? contextToken.parent.parent : void 0;
|
|
146043
146049
|
}
|
|
146044
|
-
|
|
146045
|
-
return isValidKeyword(contextToken.kind) || contextToken.kind === 41 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword((_a2 = identifierToKeywordKind(contextToken)) != null ? _a2 : 0 /* Unknown */) ? contextToken.parent.parent : void 0;
|
|
146050
|
+
return void 0;
|
|
146046
146051
|
}
|
|
146047
146052
|
}
|
|
146048
146053
|
function tryGetTypeLiteralNode(node) {
|
package/lib/typescript.js
CHANGED
|
@@ -42,7 +42,7 @@ var ts = (() => {
|
|
|
42
42
|
"src/compiler/corePublic.ts"() {
|
|
43
43
|
"use strict";
|
|
44
44
|
versionMajorMinor = "5.0";
|
|
45
|
-
version = `${versionMajorMinor}.0-dev.
|
|
45
|
+
version = `${versionMajorMinor}.0-dev.20230114`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -36252,6 +36252,7 @@ ${lanes.join("\n")}
|
|
|
36252
36252
|
["es2020", "lib.es2020.d.ts"],
|
|
36253
36253
|
["es2021", "lib.es2021.d.ts"],
|
|
36254
36254
|
["es2022", "lib.es2022.d.ts"],
|
|
36255
|
+
["es2023", "lib.es2023.d.ts"],
|
|
36255
36256
|
["esnext", "lib.esnext.d.ts"],
|
|
36256
36257
|
// Host only
|
|
36257
36258
|
["dom", "lib.dom.d.ts"],
|
|
@@ -36305,7 +36306,8 @@ ${lanes.join("\n")}
|
|
|
36305
36306
|
["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"],
|
|
36306
36307
|
["es2022.string", "lib.es2022.string.d.ts"],
|
|
36307
36308
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
36308
|
-
["
|
|
36309
|
+
["es2023.array", "lib.es2023.array.d.ts"],
|
|
36310
|
+
["esnext.array", "lib.es2023.array.d.ts"],
|
|
36309
36311
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
36310
36312
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
36311
36313
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
|
@@ -54713,7 +54715,7 @@ ${lanes.join("\n")}
|
|
|
54713
54715
|
}
|
|
54714
54716
|
function isConstTypeVariable(type) {
|
|
54715
54717
|
var _a2;
|
|
54716
|
-
return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
|
|
54718
|
+
return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || isGenericTupleType(type) && findIndex(getTypeArguments(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0 || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
|
|
54717
54719
|
}
|
|
54718
54720
|
function getConstraintOfIndexedAccess(type) {
|
|
54719
54721
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -66629,6 +66631,7 @@ ${lanes.join("\n")}
|
|
|
66629
66631
|
}
|
|
66630
66632
|
}
|
|
66631
66633
|
function getNarrowedTypeOfSymbol(symbol, location) {
|
|
66634
|
+
var _a2;
|
|
66632
66635
|
const type = getTypeOfSymbol(symbol);
|
|
66633
66636
|
const declaration = symbol.valueDeclaration;
|
|
66634
66637
|
if (declaration) {
|
|
@@ -66664,7 +66667,7 @@ ${lanes.join("\n")}
|
|
|
66664
66667
|
if (func.parameters.length >= 2 && isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
|
|
66665
66668
|
const contextualSignature = getContextualSignature(func);
|
|
66666
66669
|
if (contextualSignature && contextualSignature.parameters.length === 1 && signatureHasRestParameter(contextualSignature)) {
|
|
66667
|
-
const restType = getReducedApparentType(getTypeOfSymbol(contextualSignature.parameters[0]));
|
|
66670
|
+
const restType = getReducedApparentType(instantiateType(getTypeOfSymbol(contextualSignature.parameters[0]), (_a2 = getInferenceContext(func)) == null ? void 0 : _a2.nonFixingMapper));
|
|
66668
66671
|
if (restType.flags & 1048576 /* Union */ && everyType(restType, isTupleType) && !isSymbolAssigned(symbol)) {
|
|
66669
66672
|
const narrowedType = getFlowTypeOfReference(
|
|
66670
66673
|
func,
|
|
@@ -67885,7 +67888,9 @@ ${lanes.join("\n")}
|
|
|
67885
67888
|
}
|
|
67886
67889
|
const index = findContextualNode(node);
|
|
67887
67890
|
if (index >= 0) {
|
|
67888
|
-
|
|
67891
|
+
const cached = contextualTypes[index];
|
|
67892
|
+
if (cached || !contextFlags)
|
|
67893
|
+
return cached;
|
|
67889
67894
|
}
|
|
67890
67895
|
const { parent: parent2 } = node;
|
|
67891
67896
|
switch (parent2.kind) {
|
|
@@ -146049,14 +146054,14 @@ ${lanes.join("\n")}
|
|
|
146049
146054
|
case 27 /* CommaToken */:
|
|
146050
146055
|
return tryCast(contextToken.parent, isObjectTypeDeclaration);
|
|
146051
146056
|
default:
|
|
146052
|
-
if (
|
|
146053
|
-
if (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line
|
|
146057
|
+
if (isObjectTypeDeclaration(location)) {
|
|
146058
|
+
if (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) {
|
|
146054
146059
|
return location;
|
|
146055
146060
|
}
|
|
146056
|
-
|
|
146061
|
+
const isValidKeyword = isClassLike(contextToken.parent.parent) ? isClassMemberCompletionKeyword : isInterfaceOrTypeLiteralCompletionKeyword;
|
|
146062
|
+
return isValidKeyword(contextToken.kind) || contextToken.kind === 41 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword((_a2 = identifierToKeywordKind(contextToken)) != null ? _a2 : 0 /* Unknown */) ? contextToken.parent.parent : void 0;
|
|
146057
146063
|
}
|
|
146058
|
-
|
|
146059
|
-
return isValidKeyword(contextToken.kind) || contextToken.kind === 41 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword((_a2 = identifierToKeywordKind(contextToken)) != null ? _a2 : 0 /* Unknown */) ? contextToken.parent.parent : void 0;
|
|
146064
|
+
return void 0;
|
|
146060
146065
|
}
|
|
146061
146066
|
}
|
|
146062
146067
|
function tryGetTypeLiteralNode(node) {
|
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.0";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20230114`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -25979,6 +25979,7 @@ var libEntries = [
|
|
|
25979
25979
|
["es2020", "lib.es2020.d.ts"],
|
|
25980
25980
|
["es2021", "lib.es2021.d.ts"],
|
|
25981
25981
|
["es2022", "lib.es2022.d.ts"],
|
|
25982
|
+
["es2023", "lib.es2023.d.ts"],
|
|
25982
25983
|
["esnext", "lib.esnext.d.ts"],
|
|
25983
25984
|
// Host only
|
|
25984
25985
|
["dom", "lib.dom.d.ts"],
|
|
@@ -26032,7 +26033,8 @@ var libEntries = [
|
|
|
26032
26033
|
["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"],
|
|
26033
26034
|
["es2022.string", "lib.es2022.string.d.ts"],
|
|
26034
26035
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
26035
|
-
["
|
|
26036
|
+
["es2023.array", "lib.es2023.array.d.ts"],
|
|
26037
|
+
["esnext.array", "lib.es2023.array.d.ts"],
|
|
26036
26038
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
26037
26039
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
26038
26040
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
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.0.0-dev.
|
|
5
|
+
"version": "5.0.0-dev.20230114",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|