typescript 5.5.4 → 5.6.2
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/cs/diagnosticMessages.generated.json +292 -85
- package/lib/de/diagnosticMessages.generated.json +292 -85
- package/lib/es/diagnosticMessages.generated.json +290 -83
- package/lib/fr/diagnosticMessages.generated.json +292 -85
- package/lib/it/diagnosticMessages.generated.json +291 -84
- package/lib/ja/diagnosticMessages.generated.json +291 -84
- package/lib/ko/diagnosticMessages.generated.json +291 -84
- package/lib/lib.dom.asynciterable.d.ts +14 -6
- package/lib/lib.dom.d.ts +349 -858
- package/lib/lib.dom.iterable.d.ts +95 -79
- package/lib/lib.es2015.generator.d.ts +2 -2
- package/lib/lib.es2015.iterable.d.ts +100 -68
- package/lib/lib.es2017.object.d.ts +4 -4
- package/lib/lib.es2018.asyncgenerator.d.ts +2 -2
- package/lib/lib.es2018.asynciterable.d.ts +16 -6
- package/lib/lib.es2020.bigint.d.ts +8 -8
- package/lib/lib.es2020.string.d.ts +2 -2
- package/lib/lib.es2020.symbol.wellknown.d.ts +5 -1
- package/lib/lib.es2022.intl.d.ts +5 -1
- package/lib/lib.esnext.d.ts +1 -0
- package/lib/lib.esnext.disposable.d.ts +8 -0
- package/lib/lib.esnext.iterator.d.ts +148 -0
- package/lib/lib.webworker.asynciterable.d.ts +14 -6
- package/lib/lib.webworker.d.ts +79 -100
- package/lib/lib.webworker.iterable.d.ts +47 -35
- package/lib/pl/diagnosticMessages.generated.json +290 -83
- package/lib/pt-br/diagnosticMessages.generated.json +292 -85
- package/lib/ru/diagnosticMessages.generated.json +292 -85
- package/lib/tr/diagnosticMessages.generated.json +292 -85
- package/lib/tsc.js +2744 -1783
- package/lib/tsserver.js +33 -31
- package/lib/typescript.d.ts +244 -156
- package/lib/typescript.js +4460 -3392
- package/lib/typingsInstaller.js +3 -3
- package/lib/zh-cn/diagnosticMessages.generated.json +291 -84
- package/lib/zh-tw/diagnosticMessages.generated.json +290 -83
- package/package.json +36 -31
|
@@ -38,39 +38,59 @@ interface IteratorReturnResult<TReturn> {
|
|
|
38
38
|
|
|
39
39
|
type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
|
|
40
40
|
|
|
41
|
-
interface Iterator<T, TReturn = any, TNext =
|
|
41
|
+
interface Iterator<T, TReturn = any, TNext = any> {
|
|
42
42
|
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
43
|
-
next(...
|
|
43
|
+
next(...[value]: [] | [TNext]): IteratorResult<T, TReturn>;
|
|
44
44
|
return?(value?: TReturn): IteratorResult<T, TReturn>;
|
|
45
45
|
throw?(e?: any): IteratorResult<T, TReturn>;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
interface Iterable<T> {
|
|
49
|
-
[Symbol.iterator](): Iterator<T>;
|
|
48
|
+
interface Iterable<T, TReturn = any, TNext = any> {
|
|
49
|
+
[Symbol.iterator](): Iterator<T, TReturn, TNext>;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Describes a user-defined {@link Iterator} that is also iterable.
|
|
54
|
+
*/
|
|
55
|
+
interface IterableIterator<T, TReturn = any, TNext = any> extends Iterator<T, TReturn, TNext> {
|
|
56
|
+
[Symbol.iterator](): IterableIterator<T, TReturn, TNext>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`.
|
|
61
|
+
*/
|
|
62
|
+
interface IteratorObject<T, TReturn = unknown, TNext = unknown> extends Iterator<T, TReturn, TNext> {
|
|
63
|
+
[Symbol.iterator](): IteratorObject<T, TReturn, TNext>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Defines the `TReturn` type used for built-in iterators produced by `Array`, `Map`, `Set`, and others.
|
|
68
|
+
* This is `undefined` when `strictBuiltInIteratorReturn` is `true`; otherwise, this is `any`.
|
|
69
|
+
*/
|
|
70
|
+
type BuiltinIteratorReturn = intrinsic;
|
|
71
|
+
|
|
72
|
+
interface ArrayIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
73
|
+
[Symbol.iterator](): ArrayIterator<T>;
|
|
54
74
|
}
|
|
55
75
|
|
|
56
76
|
interface Array<T> {
|
|
57
77
|
/** Iterator */
|
|
58
|
-
[Symbol.iterator]():
|
|
78
|
+
[Symbol.iterator](): ArrayIterator<T>;
|
|
59
79
|
|
|
60
80
|
/**
|
|
61
81
|
* Returns an iterable of key, value pairs for every entry in the array
|
|
62
82
|
*/
|
|
63
|
-
entries():
|
|
83
|
+
entries(): ArrayIterator<[number, T]>;
|
|
64
84
|
|
|
65
85
|
/**
|
|
66
86
|
* Returns an iterable of keys in the array
|
|
67
87
|
*/
|
|
68
|
-
keys():
|
|
88
|
+
keys(): ArrayIterator<number>;
|
|
69
89
|
|
|
70
90
|
/**
|
|
71
91
|
* Returns an iterable of values in the array
|
|
72
92
|
*/
|
|
73
|
-
values():
|
|
93
|
+
values(): ArrayIterator<T>;
|
|
74
94
|
}
|
|
75
95
|
|
|
76
96
|
interface ArrayConstructor {
|
|
@@ -91,67 +111,71 @@ interface ArrayConstructor {
|
|
|
91
111
|
|
|
92
112
|
interface ReadonlyArray<T> {
|
|
93
113
|
/** Iterator of values in the array. */
|
|
94
|
-
[Symbol.iterator]():
|
|
114
|
+
[Symbol.iterator](): ArrayIterator<T>;
|
|
95
115
|
|
|
96
116
|
/**
|
|
97
117
|
* Returns an iterable of key, value pairs for every entry in the array
|
|
98
118
|
*/
|
|
99
|
-
entries():
|
|
119
|
+
entries(): ArrayIterator<[number, T]>;
|
|
100
120
|
|
|
101
121
|
/**
|
|
102
122
|
* Returns an iterable of keys in the array
|
|
103
123
|
*/
|
|
104
|
-
keys():
|
|
124
|
+
keys(): ArrayIterator<number>;
|
|
105
125
|
|
|
106
126
|
/**
|
|
107
127
|
* Returns an iterable of values in the array
|
|
108
128
|
*/
|
|
109
|
-
values():
|
|
129
|
+
values(): ArrayIterator<T>;
|
|
110
130
|
}
|
|
111
131
|
|
|
112
132
|
interface IArguments {
|
|
113
133
|
/** Iterator */
|
|
114
|
-
[Symbol.iterator]():
|
|
134
|
+
[Symbol.iterator](): ArrayIterator<any>;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
interface MapIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
138
|
+
[Symbol.iterator](): MapIterator<T>;
|
|
115
139
|
}
|
|
116
140
|
|
|
117
141
|
interface Map<K, V> {
|
|
118
142
|
/** Returns an iterable of entries in the map. */
|
|
119
|
-
[Symbol.iterator]():
|
|
143
|
+
[Symbol.iterator](): MapIterator<[K, V]>;
|
|
120
144
|
|
|
121
145
|
/**
|
|
122
146
|
* Returns an iterable of key, value pairs for every entry in the map.
|
|
123
147
|
*/
|
|
124
|
-
entries():
|
|
148
|
+
entries(): MapIterator<[K, V]>;
|
|
125
149
|
|
|
126
150
|
/**
|
|
127
151
|
* Returns an iterable of keys in the map
|
|
128
152
|
*/
|
|
129
|
-
keys():
|
|
153
|
+
keys(): MapIterator<K>;
|
|
130
154
|
|
|
131
155
|
/**
|
|
132
156
|
* Returns an iterable of values in the map
|
|
133
157
|
*/
|
|
134
|
-
values():
|
|
158
|
+
values(): MapIterator<V>;
|
|
135
159
|
}
|
|
136
160
|
|
|
137
161
|
interface ReadonlyMap<K, V> {
|
|
138
162
|
/** Returns an iterable of entries in the map. */
|
|
139
|
-
[Symbol.iterator]():
|
|
163
|
+
[Symbol.iterator](): MapIterator<[K, V]>;
|
|
140
164
|
|
|
141
165
|
/**
|
|
142
166
|
* Returns an iterable of key, value pairs for every entry in the map.
|
|
143
167
|
*/
|
|
144
|
-
entries():
|
|
168
|
+
entries(): MapIterator<[K, V]>;
|
|
145
169
|
|
|
146
170
|
/**
|
|
147
171
|
* Returns an iterable of keys in the map
|
|
148
172
|
*/
|
|
149
|
-
keys():
|
|
173
|
+
keys(): MapIterator<K>;
|
|
150
174
|
|
|
151
175
|
/**
|
|
152
176
|
* Returns an iterable of values in the map
|
|
153
177
|
*/
|
|
154
|
-
values():
|
|
178
|
+
values(): MapIterator<V>;
|
|
155
179
|
}
|
|
156
180
|
|
|
157
181
|
interface MapConstructor {
|
|
@@ -165,42 +189,46 @@ interface WeakMapConstructor {
|
|
|
165
189
|
new <K extends WeakKey, V>(iterable: Iterable<readonly [K, V]>): WeakMap<K, V>;
|
|
166
190
|
}
|
|
167
191
|
|
|
192
|
+
interface SetIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
193
|
+
[Symbol.iterator](): SetIterator<T>;
|
|
194
|
+
}
|
|
195
|
+
|
|
168
196
|
interface Set<T> {
|
|
169
197
|
/** Iterates over values in the set. */
|
|
170
|
-
[Symbol.iterator]():
|
|
198
|
+
[Symbol.iterator](): SetIterator<T>;
|
|
171
199
|
/**
|
|
172
200
|
* Returns an iterable of [v,v] pairs for every value `v` in the set.
|
|
173
201
|
*/
|
|
174
|
-
entries():
|
|
202
|
+
entries(): SetIterator<[T, T]>;
|
|
175
203
|
/**
|
|
176
204
|
* Despite its name, returns an iterable of the values in the set.
|
|
177
205
|
*/
|
|
178
|
-
keys():
|
|
206
|
+
keys(): SetIterator<T>;
|
|
179
207
|
|
|
180
208
|
/**
|
|
181
209
|
* Returns an iterable of values in the set.
|
|
182
210
|
*/
|
|
183
|
-
values():
|
|
211
|
+
values(): SetIterator<T>;
|
|
184
212
|
}
|
|
185
213
|
|
|
186
214
|
interface ReadonlySet<T> {
|
|
187
215
|
/** Iterates over values in the set. */
|
|
188
|
-
[Symbol.iterator]():
|
|
216
|
+
[Symbol.iterator](): SetIterator<T>;
|
|
189
217
|
|
|
190
218
|
/**
|
|
191
219
|
* Returns an iterable of [v,v] pairs for every value `v` in the set.
|
|
192
220
|
*/
|
|
193
|
-
entries():
|
|
221
|
+
entries(): SetIterator<[T, T]>;
|
|
194
222
|
|
|
195
223
|
/**
|
|
196
224
|
* Despite its name, returns an iterable of the values in the set.
|
|
197
225
|
*/
|
|
198
|
-
keys():
|
|
226
|
+
keys(): SetIterator<T>;
|
|
199
227
|
|
|
200
228
|
/**
|
|
201
229
|
* Returns an iterable of values in the set.
|
|
202
230
|
*/
|
|
203
|
-
values():
|
|
231
|
+
values(): SetIterator<T>;
|
|
204
232
|
}
|
|
205
233
|
|
|
206
234
|
interface SetConstructor {
|
|
@@ -233,25 +261,29 @@ interface PromiseConstructor {
|
|
|
233
261
|
race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
|
|
234
262
|
}
|
|
235
263
|
|
|
264
|
+
interface StringIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
265
|
+
[Symbol.iterator](): StringIterator<T>;
|
|
266
|
+
}
|
|
267
|
+
|
|
236
268
|
interface String {
|
|
237
269
|
/** Iterator */
|
|
238
|
-
[Symbol.iterator]():
|
|
270
|
+
[Symbol.iterator](): StringIterator<string>;
|
|
239
271
|
}
|
|
240
272
|
|
|
241
273
|
interface Int8Array {
|
|
242
|
-
[Symbol.iterator]():
|
|
274
|
+
[Symbol.iterator](): ArrayIterator<number>;
|
|
243
275
|
/**
|
|
244
276
|
* Returns an array of key, value pairs for every entry in the array
|
|
245
277
|
*/
|
|
246
|
-
entries():
|
|
278
|
+
entries(): ArrayIterator<[number, number]>;
|
|
247
279
|
/**
|
|
248
280
|
* Returns an list of keys in the array
|
|
249
281
|
*/
|
|
250
|
-
keys():
|
|
282
|
+
keys(): ArrayIterator<number>;
|
|
251
283
|
/**
|
|
252
284
|
* Returns an list of values in the array
|
|
253
285
|
*/
|
|
254
|
-
values():
|
|
286
|
+
values(): ArrayIterator<number>;
|
|
255
287
|
}
|
|
256
288
|
|
|
257
289
|
interface Int8ArrayConstructor {
|
|
@@ -267,19 +299,19 @@ interface Int8ArrayConstructor {
|
|
|
267
299
|
}
|
|
268
300
|
|
|
269
301
|
interface Uint8Array {
|
|
270
|
-
[Symbol.iterator]():
|
|
302
|
+
[Symbol.iterator](): ArrayIterator<number>;
|
|
271
303
|
/**
|
|
272
304
|
* Returns an array of key, value pairs for every entry in the array
|
|
273
305
|
*/
|
|
274
|
-
entries():
|
|
306
|
+
entries(): ArrayIterator<[number, number]>;
|
|
275
307
|
/**
|
|
276
308
|
* Returns an list of keys in the array
|
|
277
309
|
*/
|
|
278
|
-
keys():
|
|
310
|
+
keys(): ArrayIterator<number>;
|
|
279
311
|
/**
|
|
280
312
|
* Returns an list of values in the array
|
|
281
313
|
*/
|
|
282
|
-
values():
|
|
314
|
+
values(): ArrayIterator<number>;
|
|
283
315
|
}
|
|
284
316
|
|
|
285
317
|
interface Uint8ArrayConstructor {
|
|
@@ -295,21 +327,21 @@ interface Uint8ArrayConstructor {
|
|
|
295
327
|
}
|
|
296
328
|
|
|
297
329
|
interface Uint8ClampedArray {
|
|
298
|
-
[Symbol.iterator]():
|
|
330
|
+
[Symbol.iterator](): ArrayIterator<number>;
|
|
299
331
|
/**
|
|
300
332
|
* Returns an array of key, value pairs for every entry in the array
|
|
301
333
|
*/
|
|
302
|
-
entries():
|
|
334
|
+
entries(): ArrayIterator<[number, number]>;
|
|
303
335
|
|
|
304
336
|
/**
|
|
305
337
|
* Returns an list of keys in the array
|
|
306
338
|
*/
|
|
307
|
-
keys():
|
|
339
|
+
keys(): ArrayIterator<number>;
|
|
308
340
|
|
|
309
341
|
/**
|
|
310
342
|
* Returns an list of values in the array
|
|
311
343
|
*/
|
|
312
|
-
values():
|
|
344
|
+
values(): ArrayIterator<number>;
|
|
313
345
|
}
|
|
314
346
|
|
|
315
347
|
interface Uint8ClampedArrayConstructor {
|
|
@@ -325,21 +357,21 @@ interface Uint8ClampedArrayConstructor {
|
|
|
325
357
|
}
|
|
326
358
|
|
|
327
359
|
interface Int16Array {
|
|
328
|
-
[Symbol.iterator]():
|
|
360
|
+
[Symbol.iterator](): ArrayIterator<number>;
|
|
329
361
|
/**
|
|
330
362
|
* Returns an array of key, value pairs for every entry in the array
|
|
331
363
|
*/
|
|
332
|
-
entries():
|
|
364
|
+
entries(): ArrayIterator<[number, number]>;
|
|
333
365
|
|
|
334
366
|
/**
|
|
335
367
|
* Returns an list of keys in the array
|
|
336
368
|
*/
|
|
337
|
-
keys():
|
|
369
|
+
keys(): ArrayIterator<number>;
|
|
338
370
|
|
|
339
371
|
/**
|
|
340
372
|
* Returns an list of values in the array
|
|
341
373
|
*/
|
|
342
|
-
values():
|
|
374
|
+
values(): ArrayIterator<number>;
|
|
343
375
|
}
|
|
344
376
|
|
|
345
377
|
interface Int16ArrayConstructor {
|
|
@@ -355,19 +387,19 @@ interface Int16ArrayConstructor {
|
|
|
355
387
|
}
|
|
356
388
|
|
|
357
389
|
interface Uint16Array {
|
|
358
|
-
[Symbol.iterator]():
|
|
390
|
+
[Symbol.iterator](): ArrayIterator<number>;
|
|
359
391
|
/**
|
|
360
392
|
* Returns an array of key, value pairs for every entry in the array
|
|
361
393
|
*/
|
|
362
|
-
entries():
|
|
394
|
+
entries(): ArrayIterator<[number, number]>;
|
|
363
395
|
/**
|
|
364
396
|
* Returns an list of keys in the array
|
|
365
397
|
*/
|
|
366
|
-
keys():
|
|
398
|
+
keys(): ArrayIterator<number>;
|
|
367
399
|
/**
|
|
368
400
|
* Returns an list of values in the array
|
|
369
401
|
*/
|
|
370
|
-
values():
|
|
402
|
+
values(): ArrayIterator<number>;
|
|
371
403
|
}
|
|
372
404
|
|
|
373
405
|
interface Uint16ArrayConstructor {
|
|
@@ -383,19 +415,19 @@ interface Uint16ArrayConstructor {
|
|
|
383
415
|
}
|
|
384
416
|
|
|
385
417
|
interface Int32Array {
|
|
386
|
-
[Symbol.iterator]():
|
|
418
|
+
[Symbol.iterator](): ArrayIterator<number>;
|
|
387
419
|
/**
|
|
388
420
|
* Returns an array of key, value pairs for every entry in the array
|
|
389
421
|
*/
|
|
390
|
-
entries():
|
|
422
|
+
entries(): ArrayIterator<[number, number]>;
|
|
391
423
|
/**
|
|
392
424
|
* Returns an list of keys in the array
|
|
393
425
|
*/
|
|
394
|
-
keys():
|
|
426
|
+
keys(): ArrayIterator<number>;
|
|
395
427
|
/**
|
|
396
428
|
* Returns an list of values in the array
|
|
397
429
|
*/
|
|
398
|
-
values():
|
|
430
|
+
values(): ArrayIterator<number>;
|
|
399
431
|
}
|
|
400
432
|
|
|
401
433
|
interface Int32ArrayConstructor {
|
|
@@ -411,19 +443,19 @@ interface Int32ArrayConstructor {
|
|
|
411
443
|
}
|
|
412
444
|
|
|
413
445
|
interface Uint32Array {
|
|
414
|
-
[Symbol.iterator]():
|
|
446
|
+
[Symbol.iterator](): ArrayIterator<number>;
|
|
415
447
|
/**
|
|
416
448
|
* Returns an array of key, value pairs for every entry in the array
|
|
417
449
|
*/
|
|
418
|
-
entries():
|
|
450
|
+
entries(): ArrayIterator<[number, number]>;
|
|
419
451
|
/**
|
|
420
452
|
* Returns an list of keys in the array
|
|
421
453
|
*/
|
|
422
|
-
keys():
|
|
454
|
+
keys(): ArrayIterator<number>;
|
|
423
455
|
/**
|
|
424
456
|
* Returns an list of values in the array
|
|
425
457
|
*/
|
|
426
|
-
values():
|
|
458
|
+
values(): ArrayIterator<number>;
|
|
427
459
|
}
|
|
428
460
|
|
|
429
461
|
interface Uint32ArrayConstructor {
|
|
@@ -439,19 +471,19 @@ interface Uint32ArrayConstructor {
|
|
|
439
471
|
}
|
|
440
472
|
|
|
441
473
|
interface Float32Array {
|
|
442
|
-
[Symbol.iterator]():
|
|
474
|
+
[Symbol.iterator](): ArrayIterator<number>;
|
|
443
475
|
/**
|
|
444
476
|
* Returns an array of key, value pairs for every entry in the array
|
|
445
477
|
*/
|
|
446
|
-
entries():
|
|
478
|
+
entries(): ArrayIterator<[number, number]>;
|
|
447
479
|
/**
|
|
448
480
|
* Returns an list of keys in the array
|
|
449
481
|
*/
|
|
450
|
-
keys():
|
|
482
|
+
keys(): ArrayIterator<number>;
|
|
451
483
|
/**
|
|
452
484
|
* Returns an list of values in the array
|
|
453
485
|
*/
|
|
454
|
-
values():
|
|
486
|
+
values(): ArrayIterator<number>;
|
|
455
487
|
}
|
|
456
488
|
|
|
457
489
|
interface Float32ArrayConstructor {
|
|
@@ -467,19 +499,19 @@ interface Float32ArrayConstructor {
|
|
|
467
499
|
}
|
|
468
500
|
|
|
469
501
|
interface Float64Array {
|
|
470
|
-
[Symbol.iterator]():
|
|
502
|
+
[Symbol.iterator](): ArrayIterator<number>;
|
|
471
503
|
/**
|
|
472
504
|
* Returns an array of key, value pairs for every entry in the array
|
|
473
505
|
*/
|
|
474
|
-
entries():
|
|
506
|
+
entries(): ArrayIterator<[number, number]>;
|
|
475
507
|
/**
|
|
476
508
|
* Returns an list of keys in the array
|
|
477
509
|
*/
|
|
478
|
-
keys():
|
|
510
|
+
keys(): ArrayIterator<number>;
|
|
479
511
|
/**
|
|
480
512
|
* Returns an list of values in the array
|
|
481
513
|
*/
|
|
482
|
-
values():
|
|
514
|
+
values(): ArrayIterator<number>;
|
|
483
515
|
}
|
|
484
516
|
|
|
485
517
|
interface Float64ArrayConstructor {
|
|
@@ -18,25 +18,25 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
interface ObjectConstructor {
|
|
20
20
|
/**
|
|
21
|
-
* Returns an array of values of the enumerable properties of an object
|
|
21
|
+
* Returns an array of values of the enumerable own properties of an object
|
|
22
22
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
23
23
|
*/
|
|
24
24
|
values<T>(o: { [s: string]: T; } | ArrayLike<T>): T[];
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Returns an array of values of the enumerable properties of an object
|
|
27
|
+
* Returns an array of values of the enumerable own properties of an object
|
|
28
28
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
29
29
|
*/
|
|
30
30
|
values(o: {}): any[];
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* Returns an array of key/values of the enumerable properties of an object
|
|
33
|
+
* Returns an array of key/values of the enumerable own properties of an object
|
|
34
34
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
35
35
|
*/
|
|
36
36
|
entries<T>(o: { [s: string]: T; } | ArrayLike<T>): [string, T][];
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* Returns an array of key/values of the enumerable properties of an object
|
|
39
|
+
* Returns an array of key/values of the enumerable own properties of an object
|
|
40
40
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
41
41
|
*/
|
|
42
42
|
entries(o: {}): [string, any][];
|
|
@@ -18,9 +18,9 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
/// <reference lib="es2018.asynciterable" />
|
|
20
20
|
|
|
21
|
-
interface AsyncGenerator<T = unknown, TReturn = any, TNext =
|
|
21
|
+
interface AsyncGenerator<T = unknown, TReturn = any, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
|
|
22
22
|
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
23
|
-
next(...
|
|
23
|
+
next(...[value]: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
|
|
24
24
|
return(value: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
|
|
25
25
|
throw(e: any): Promise<IteratorResult<T, TReturn>>;
|
|
26
26
|
[Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>;
|
|
@@ -27,17 +27,27 @@ interface SymbolConstructor {
|
|
|
27
27
|
readonly asyncIterator: unique symbol;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
interface AsyncIterator<T, TReturn = any, TNext =
|
|
30
|
+
interface AsyncIterator<T, TReturn = any, TNext = any> {
|
|
31
31
|
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
32
|
-
next(...
|
|
32
|
+
next(...[value]: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
|
|
33
33
|
return?(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
|
|
34
34
|
throw?(e?: any): Promise<IteratorResult<T, TReturn>>;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
interface AsyncIterable<T> {
|
|
38
|
-
[Symbol.asyncIterator](): AsyncIterator<T>;
|
|
37
|
+
interface AsyncIterable<T, TReturn = any, TNext = any> {
|
|
38
|
+
[Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Describes a user-defined {@link AsyncIterator} that is also async iterable.
|
|
43
|
+
*/
|
|
44
|
+
interface AsyncIterableIterator<T, TReturn = any, TNext = any> extends AsyncIterator<T, TReturn, TNext> {
|
|
45
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<T, TReturn, TNext>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`.
|
|
50
|
+
*/
|
|
51
|
+
interface AsyncIteratorObject<T, TReturn = unknown, TNext = unknown> extends AsyncIterator<T, TReturn, TNext> {
|
|
52
|
+
[Symbol.asyncIterator](): AsyncIteratorObject<T, TReturn, TNext>;
|
|
43
53
|
}
|
|
@@ -171,7 +171,7 @@ interface BigInt64Array {
|
|
|
171
171
|
copyWithin(target: number, start: number, end?: number): this;
|
|
172
172
|
|
|
173
173
|
/** Yields index, value pairs for every entry in the array. */
|
|
174
|
-
entries():
|
|
174
|
+
entries(): ArrayIterator<[number, bigint]>;
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
177
|
* Determines whether all the members of an array satisfy the specified test.
|
|
@@ -256,7 +256,7 @@ interface BigInt64Array {
|
|
|
256
256
|
join(separator?: string): string;
|
|
257
257
|
|
|
258
258
|
/** Yields each index in the array. */
|
|
259
|
-
keys():
|
|
259
|
+
keys(): ArrayIterator<number>;
|
|
260
260
|
|
|
261
261
|
/**
|
|
262
262
|
* Returns the index of the last occurrence of a value in an array.
|
|
@@ -378,9 +378,9 @@ interface BigInt64Array {
|
|
|
378
378
|
valueOf(): BigInt64Array;
|
|
379
379
|
|
|
380
380
|
/** Yields each value in the array. */
|
|
381
|
-
values():
|
|
381
|
+
values(): ArrayIterator<bigint>;
|
|
382
382
|
|
|
383
|
-
[Symbol.iterator]():
|
|
383
|
+
[Symbol.iterator](): ArrayIterator<bigint>;
|
|
384
384
|
|
|
385
385
|
readonly [Symbol.toStringTag]: "BigInt64Array";
|
|
386
386
|
|
|
@@ -443,7 +443,7 @@ interface BigUint64Array {
|
|
|
443
443
|
copyWithin(target: number, start: number, end?: number): this;
|
|
444
444
|
|
|
445
445
|
/** Yields index, value pairs for every entry in the array. */
|
|
446
|
-
entries():
|
|
446
|
+
entries(): ArrayIterator<[number, bigint]>;
|
|
447
447
|
|
|
448
448
|
/**
|
|
449
449
|
* Determines whether all the members of an array satisfy the specified test.
|
|
@@ -528,7 +528,7 @@ interface BigUint64Array {
|
|
|
528
528
|
join(separator?: string): string;
|
|
529
529
|
|
|
530
530
|
/** Yields each index in the array. */
|
|
531
|
-
keys():
|
|
531
|
+
keys(): ArrayIterator<number>;
|
|
532
532
|
|
|
533
533
|
/**
|
|
534
534
|
* Returns the index of the last occurrence of a value in an array.
|
|
@@ -650,9 +650,9 @@ interface BigUint64Array {
|
|
|
650
650
|
valueOf(): BigUint64Array;
|
|
651
651
|
|
|
652
652
|
/** Yields each value in the array. */
|
|
653
|
-
values():
|
|
653
|
+
values(): ArrayIterator<bigint>;
|
|
654
654
|
|
|
655
|
-
[Symbol.iterator]():
|
|
655
|
+
[Symbol.iterator](): ArrayIterator<bigint>;
|
|
656
656
|
|
|
657
657
|
readonly [Symbol.toStringTag]: "BigUint64Array";
|
|
658
658
|
|
|
@@ -16,7 +16,7 @@ and limitations under the License.
|
|
|
16
16
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
|
-
/// <reference lib="
|
|
19
|
+
/// <reference lib="es2020.symbol.wellknown" />
|
|
20
20
|
|
|
21
21
|
interface String {
|
|
22
22
|
/**
|
|
@@ -24,7 +24,7 @@ interface String {
|
|
|
24
24
|
* containing the results of that search.
|
|
25
25
|
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
|
|
26
26
|
*/
|
|
27
|
-
matchAll(regexp: RegExp):
|
|
27
|
+
matchAll(regexp: RegExp): RegExpStringIterator<RegExpExecArray>;
|
|
28
28
|
|
|
29
29
|
/** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
|
|
30
30
|
toLocaleLowerCase(locales?: Intl.LocalesArgument): string;
|
|
@@ -27,11 +27,15 @@ interface SymbolConstructor {
|
|
|
27
27
|
readonly matchAll: unique symbol;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
interface RegExpStringIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
31
|
+
[Symbol.iterator](): RegExpStringIterator<T>;
|
|
32
|
+
}
|
|
33
|
+
|
|
30
34
|
interface RegExp {
|
|
31
35
|
/**
|
|
32
36
|
* Matches a string with this regular expression, and returns an iterable of matches
|
|
33
37
|
* containing the results of that search.
|
|
34
38
|
* @param string A string to search within.
|
|
35
39
|
*/
|
|
36
|
-
[Symbol.matchAll](str: string):
|
|
40
|
+
[Symbol.matchAll](str: string): RegExpStringIterator<RegExpMatchArray>;
|
|
37
41
|
}
|
package/lib/lib.es2022.intl.d.ts
CHANGED
|
@@ -46,6 +46,10 @@ declare namespace Intl {
|
|
|
46
46
|
granularity: "grapheme" | "word" | "sentence";
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
interface SegmentIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
50
|
+
[Symbol.iterator](): SegmentIterator<T>;
|
|
51
|
+
}
|
|
52
|
+
|
|
49
53
|
interface Segments {
|
|
50
54
|
/**
|
|
51
55
|
* Returns an object describing the segment in the original string that includes the code unit at a specified index.
|
|
@@ -55,7 +59,7 @@ declare namespace Intl {
|
|
|
55
59
|
containing(codeUnitIndex?: number): SegmentData;
|
|
56
60
|
|
|
57
61
|
/** Returns an iterator to iterate over the segments. */
|
|
58
|
-
[Symbol.iterator]():
|
|
62
|
+
[Symbol.iterator](): SegmentIterator<SegmentData>;
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
interface SegmentData {
|
package/lib/lib.esnext.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
/// <reference lib="es2015.symbol" />
|
|
20
|
+
/// <reference lib="es2015.iterable" />
|
|
21
|
+
/// <reference lib="es2018.asynciterable" />
|
|
20
22
|
|
|
21
23
|
interface SymbolConstructor {
|
|
22
24
|
/**
|
|
@@ -183,3 +185,9 @@ interface AsyncDisposableStackConstructor {
|
|
|
183
185
|
readonly prototype: AsyncDisposableStack;
|
|
184
186
|
}
|
|
185
187
|
declare var AsyncDisposableStack: AsyncDisposableStackConstructor;
|
|
188
|
+
|
|
189
|
+
interface IteratorObject<T, TReturn, TNext> extends Disposable {
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
interface AsyncIteratorObject<T, TReturn, TNext> extends AsyncDisposable {
|
|
193
|
+
}
|