@typescript-deploys/pr-build 5.5.0-pr-58495-31 → 5.5.0-pr-58243-73
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.es2015.iterable.d.ts +69 -67
- package/lib/lib.es2018.asynciterable.d.ts +5 -5
- package/lib/lib.es2020.bigint.d.ts +8 -8
- package/lib/lib.es2020.string.d.ts +1 -1
- package/lib/lib.es2020.symbol.wellknown.d.ts +1 -1
- package/lib/lib.es2022.intl.d.ts +1 -1
- package/lib/lib.esnext.collection.d.ts +77 -0
- package/lib/tsc.js +85 -129
- package/lib/typescript.d.ts +1 -0
- package/lib/typescript.js +86 -130
- package/package.json +1 -1
|
@@ -38,39 +38,41 @@ 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 = unknown> {
|
|
42
42
|
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
43
43
|
next(...args: [] | [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 = unknown> {
|
|
49
|
+
[Symbol.iterator](): Iterator<T, TReturn, TNext>;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
interface IterableIterator<T> extends Iterator<T> {
|
|
53
|
-
[Symbol.iterator](): IterableIterator<T>;
|
|
52
|
+
interface IterableIterator<T, TReturn = any, TNext = unknown> extends Iterator<T, TReturn, TNext> {
|
|
53
|
+
[Symbol.iterator](): IterableIterator<T, TReturn, TNext>;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
type BuiltinIteratorReturn = intrinsic;
|
|
57
|
+
|
|
56
58
|
interface Array<T> {
|
|
57
59
|
/** Iterator */
|
|
58
|
-
[Symbol.iterator](): IterableIterator<T>;
|
|
60
|
+
[Symbol.iterator](): IterableIterator<T, BuiltinIteratorReturn>;
|
|
59
61
|
|
|
60
62
|
/**
|
|
61
63
|
* Returns an iterable of key, value pairs for every entry in the array
|
|
62
64
|
*/
|
|
63
|
-
entries(): IterableIterator<[number, T]>;
|
|
65
|
+
entries(): IterableIterator<[number, T], BuiltinIteratorReturn>;
|
|
64
66
|
|
|
65
67
|
/**
|
|
66
68
|
* Returns an iterable of keys in the array
|
|
67
69
|
*/
|
|
68
|
-
keys(): IterableIterator<number>;
|
|
70
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
69
71
|
|
|
70
72
|
/**
|
|
71
73
|
* Returns an iterable of values in the array
|
|
72
74
|
*/
|
|
73
|
-
values(): IterableIterator<T>;
|
|
75
|
+
values(): IterableIterator<T, BuiltinIteratorReturn>;
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
interface ArrayConstructor {
|
|
@@ -91,67 +93,67 @@ interface ArrayConstructor {
|
|
|
91
93
|
|
|
92
94
|
interface ReadonlyArray<T> {
|
|
93
95
|
/** Iterator of values in the array. */
|
|
94
|
-
[Symbol.iterator](): IterableIterator<T>;
|
|
96
|
+
[Symbol.iterator](): IterableIterator<T, BuiltinIteratorReturn>;
|
|
95
97
|
|
|
96
98
|
/**
|
|
97
99
|
* Returns an iterable of key, value pairs for every entry in the array
|
|
98
100
|
*/
|
|
99
|
-
entries(): IterableIterator<[number, T]>;
|
|
101
|
+
entries(): IterableIterator<[number, T], BuiltinIteratorReturn>;
|
|
100
102
|
|
|
101
103
|
/**
|
|
102
104
|
* Returns an iterable of keys in the array
|
|
103
105
|
*/
|
|
104
|
-
keys(): IterableIterator<number>;
|
|
106
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
105
107
|
|
|
106
108
|
/**
|
|
107
109
|
* Returns an iterable of values in the array
|
|
108
110
|
*/
|
|
109
|
-
values(): IterableIterator<T>;
|
|
111
|
+
values(): IterableIterator<T, BuiltinIteratorReturn>;
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
interface IArguments {
|
|
113
115
|
/** Iterator */
|
|
114
|
-
[Symbol.iterator](): IterableIterator<any>;
|
|
116
|
+
[Symbol.iterator](): IterableIterator<any, BuiltinIteratorReturn>;
|
|
115
117
|
}
|
|
116
118
|
|
|
117
119
|
interface Map<K, V> {
|
|
118
120
|
/** Returns an iterable of entries in the map. */
|
|
119
|
-
[Symbol.iterator](): IterableIterator<[K, V]>;
|
|
121
|
+
[Symbol.iterator](): IterableIterator<[K, V], BuiltinIteratorReturn>;
|
|
120
122
|
|
|
121
123
|
/**
|
|
122
124
|
* Returns an iterable of key, value pairs for every entry in the map.
|
|
123
125
|
*/
|
|
124
|
-
entries(): IterableIterator<[K, V]>;
|
|
126
|
+
entries(): IterableIterator<[K, V], BuiltinIteratorReturn>;
|
|
125
127
|
|
|
126
128
|
/**
|
|
127
129
|
* Returns an iterable of keys in the map
|
|
128
130
|
*/
|
|
129
|
-
keys(): IterableIterator<K>;
|
|
131
|
+
keys(): IterableIterator<K, BuiltinIteratorReturn>;
|
|
130
132
|
|
|
131
133
|
/**
|
|
132
134
|
* Returns an iterable of values in the map
|
|
133
135
|
*/
|
|
134
|
-
values(): IterableIterator<V>;
|
|
136
|
+
values(): IterableIterator<V, BuiltinIteratorReturn>;
|
|
135
137
|
}
|
|
136
138
|
|
|
137
139
|
interface ReadonlyMap<K, V> {
|
|
138
140
|
/** Returns an iterable of entries in the map. */
|
|
139
|
-
[Symbol.iterator](): IterableIterator<[K, V]>;
|
|
141
|
+
[Symbol.iterator](): IterableIterator<[K, V], BuiltinIteratorReturn>;
|
|
140
142
|
|
|
141
143
|
/**
|
|
142
144
|
* Returns an iterable of key, value pairs for every entry in the map.
|
|
143
145
|
*/
|
|
144
|
-
entries(): IterableIterator<[K, V]>;
|
|
146
|
+
entries(): IterableIterator<[K, V], BuiltinIteratorReturn>;
|
|
145
147
|
|
|
146
148
|
/**
|
|
147
149
|
* Returns an iterable of keys in the map
|
|
148
150
|
*/
|
|
149
|
-
keys(): IterableIterator<K>;
|
|
151
|
+
keys(): IterableIterator<K, BuiltinIteratorReturn>;
|
|
150
152
|
|
|
151
153
|
/**
|
|
152
154
|
* Returns an iterable of values in the map
|
|
153
155
|
*/
|
|
154
|
-
values(): IterableIterator<V>;
|
|
156
|
+
values(): IterableIterator<V, BuiltinIteratorReturn>;
|
|
155
157
|
}
|
|
156
158
|
|
|
157
159
|
interface MapConstructor {
|
|
@@ -167,40 +169,40 @@ interface WeakMapConstructor {
|
|
|
167
169
|
|
|
168
170
|
interface Set<T> {
|
|
169
171
|
/** Iterates over values in the set. */
|
|
170
|
-
[Symbol.iterator](): IterableIterator<T>;
|
|
172
|
+
[Symbol.iterator](): IterableIterator<T, BuiltinIteratorReturn>;
|
|
171
173
|
/**
|
|
172
174
|
* Returns an iterable of [v,v] pairs for every value `v` in the set.
|
|
173
175
|
*/
|
|
174
|
-
entries(): IterableIterator<[T, T]>;
|
|
176
|
+
entries(): IterableIterator<[T, T], BuiltinIteratorReturn>;
|
|
175
177
|
/**
|
|
176
178
|
* Despite its name, returns an iterable of the values in the set.
|
|
177
179
|
*/
|
|
178
|
-
keys(): IterableIterator<T>;
|
|
180
|
+
keys(): IterableIterator<T, BuiltinIteratorReturn>;
|
|
179
181
|
|
|
180
182
|
/**
|
|
181
183
|
* Returns an iterable of values in the set.
|
|
182
184
|
*/
|
|
183
|
-
values(): IterableIterator<T>;
|
|
185
|
+
values(): IterableIterator<T, BuiltinIteratorReturn>;
|
|
184
186
|
}
|
|
185
187
|
|
|
186
188
|
interface ReadonlySet<T> {
|
|
187
189
|
/** Iterates over values in the set. */
|
|
188
|
-
[Symbol.iterator](): IterableIterator<T>;
|
|
190
|
+
[Symbol.iterator](): IterableIterator<T, BuiltinIteratorReturn>;
|
|
189
191
|
|
|
190
192
|
/**
|
|
191
193
|
* Returns an iterable of [v,v] pairs for every value `v` in the set.
|
|
192
194
|
*/
|
|
193
|
-
entries(): IterableIterator<[T, T]>;
|
|
195
|
+
entries(): IterableIterator<[T, T], BuiltinIteratorReturn>;
|
|
194
196
|
|
|
195
197
|
/**
|
|
196
198
|
* Despite its name, returns an iterable of the values in the set.
|
|
197
199
|
*/
|
|
198
|
-
keys(): IterableIterator<T>;
|
|
200
|
+
keys(): IterableIterator<T, BuiltinIteratorReturn>;
|
|
199
201
|
|
|
200
202
|
/**
|
|
201
203
|
* Returns an iterable of values in the set.
|
|
202
204
|
*/
|
|
203
|
-
values(): IterableIterator<T>;
|
|
205
|
+
values(): IterableIterator<T, BuiltinIteratorReturn>;
|
|
204
206
|
}
|
|
205
207
|
|
|
206
208
|
interface SetConstructor {
|
|
@@ -235,23 +237,23 @@ interface PromiseConstructor {
|
|
|
235
237
|
|
|
236
238
|
interface String {
|
|
237
239
|
/** Iterator */
|
|
238
|
-
[Symbol.iterator](): IterableIterator<string>;
|
|
240
|
+
[Symbol.iterator](): IterableIterator<string, BuiltinIteratorReturn>;
|
|
239
241
|
}
|
|
240
242
|
|
|
241
243
|
interface Int8Array {
|
|
242
|
-
[Symbol.iterator](): IterableIterator<number>;
|
|
244
|
+
[Symbol.iterator](): IterableIterator<number, BuiltinIteratorReturn>;
|
|
243
245
|
/**
|
|
244
246
|
* Returns an array of key, value pairs for every entry in the array
|
|
245
247
|
*/
|
|
246
|
-
entries(): IterableIterator<[number, number]>;
|
|
248
|
+
entries(): IterableIterator<[number, number], BuiltinIteratorReturn>;
|
|
247
249
|
/**
|
|
248
250
|
* Returns an list of keys in the array
|
|
249
251
|
*/
|
|
250
|
-
keys(): IterableIterator<number>;
|
|
252
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
251
253
|
/**
|
|
252
254
|
* Returns an list of values in the array
|
|
253
255
|
*/
|
|
254
|
-
values(): IterableIterator<number>;
|
|
256
|
+
values(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
255
257
|
}
|
|
256
258
|
|
|
257
259
|
interface Int8ArrayConstructor {
|
|
@@ -267,19 +269,19 @@ interface Int8ArrayConstructor {
|
|
|
267
269
|
}
|
|
268
270
|
|
|
269
271
|
interface Uint8Array {
|
|
270
|
-
[Symbol.iterator](): IterableIterator<number>;
|
|
272
|
+
[Symbol.iterator](): IterableIterator<number, BuiltinIteratorReturn>;
|
|
271
273
|
/**
|
|
272
274
|
* Returns an array of key, value pairs for every entry in the array
|
|
273
275
|
*/
|
|
274
|
-
entries(): IterableIterator<[number, number]>;
|
|
276
|
+
entries(): IterableIterator<[number, number], BuiltinIteratorReturn>;
|
|
275
277
|
/**
|
|
276
278
|
* Returns an list of keys in the array
|
|
277
279
|
*/
|
|
278
|
-
keys(): IterableIterator<number>;
|
|
280
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
279
281
|
/**
|
|
280
282
|
* Returns an list of values in the array
|
|
281
283
|
*/
|
|
282
|
-
values(): IterableIterator<number>;
|
|
284
|
+
values(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
283
285
|
}
|
|
284
286
|
|
|
285
287
|
interface Uint8ArrayConstructor {
|
|
@@ -295,21 +297,21 @@ interface Uint8ArrayConstructor {
|
|
|
295
297
|
}
|
|
296
298
|
|
|
297
299
|
interface Uint8ClampedArray {
|
|
298
|
-
[Symbol.iterator](): IterableIterator<number>;
|
|
300
|
+
[Symbol.iterator](): IterableIterator<number, BuiltinIteratorReturn>;
|
|
299
301
|
/**
|
|
300
302
|
* Returns an array of key, value pairs for every entry in the array
|
|
301
303
|
*/
|
|
302
|
-
entries(): IterableIterator<[number, number]>;
|
|
304
|
+
entries(): IterableIterator<[number, number], BuiltinIteratorReturn>;
|
|
303
305
|
|
|
304
306
|
/**
|
|
305
307
|
* Returns an list of keys in the array
|
|
306
308
|
*/
|
|
307
|
-
keys(): IterableIterator<number>;
|
|
309
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
308
310
|
|
|
309
311
|
/**
|
|
310
312
|
* Returns an list of values in the array
|
|
311
313
|
*/
|
|
312
|
-
values(): IterableIterator<number>;
|
|
314
|
+
values(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
313
315
|
}
|
|
314
316
|
|
|
315
317
|
interface Uint8ClampedArrayConstructor {
|
|
@@ -325,21 +327,21 @@ interface Uint8ClampedArrayConstructor {
|
|
|
325
327
|
}
|
|
326
328
|
|
|
327
329
|
interface Int16Array {
|
|
328
|
-
[Symbol.iterator](): IterableIterator<number>;
|
|
330
|
+
[Symbol.iterator](): IterableIterator<number, BuiltinIteratorReturn>;
|
|
329
331
|
/**
|
|
330
332
|
* Returns an array of key, value pairs for every entry in the array
|
|
331
333
|
*/
|
|
332
|
-
entries(): IterableIterator<[number, number]>;
|
|
334
|
+
entries(): IterableIterator<[number, number], BuiltinIteratorReturn>;
|
|
333
335
|
|
|
334
336
|
/**
|
|
335
337
|
* Returns an list of keys in the array
|
|
336
338
|
*/
|
|
337
|
-
keys(): IterableIterator<number>;
|
|
339
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
338
340
|
|
|
339
341
|
/**
|
|
340
342
|
* Returns an list of values in the array
|
|
341
343
|
*/
|
|
342
|
-
values(): IterableIterator<number>;
|
|
344
|
+
values(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
343
345
|
}
|
|
344
346
|
|
|
345
347
|
interface Int16ArrayConstructor {
|
|
@@ -355,19 +357,19 @@ interface Int16ArrayConstructor {
|
|
|
355
357
|
}
|
|
356
358
|
|
|
357
359
|
interface Uint16Array {
|
|
358
|
-
[Symbol.iterator](): IterableIterator<number>;
|
|
360
|
+
[Symbol.iterator](): IterableIterator<number, BuiltinIteratorReturn>;
|
|
359
361
|
/**
|
|
360
362
|
* Returns an array of key, value pairs for every entry in the array
|
|
361
363
|
*/
|
|
362
|
-
entries(): IterableIterator<[number, number]>;
|
|
364
|
+
entries(): IterableIterator<[number, number], BuiltinIteratorReturn>;
|
|
363
365
|
/**
|
|
364
366
|
* Returns an list of keys in the array
|
|
365
367
|
*/
|
|
366
|
-
keys(): IterableIterator<number>;
|
|
368
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
367
369
|
/**
|
|
368
370
|
* Returns an list of values in the array
|
|
369
371
|
*/
|
|
370
|
-
values(): IterableIterator<number>;
|
|
372
|
+
values(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
371
373
|
}
|
|
372
374
|
|
|
373
375
|
interface Uint16ArrayConstructor {
|
|
@@ -383,19 +385,19 @@ interface Uint16ArrayConstructor {
|
|
|
383
385
|
}
|
|
384
386
|
|
|
385
387
|
interface Int32Array {
|
|
386
|
-
[Symbol.iterator](): IterableIterator<number>;
|
|
388
|
+
[Symbol.iterator](): IterableIterator<number, BuiltinIteratorReturn>;
|
|
387
389
|
/**
|
|
388
390
|
* Returns an array of key, value pairs for every entry in the array
|
|
389
391
|
*/
|
|
390
|
-
entries(): IterableIterator<[number, number]>;
|
|
392
|
+
entries(): IterableIterator<[number, number], BuiltinIteratorReturn>;
|
|
391
393
|
/**
|
|
392
394
|
* Returns an list of keys in the array
|
|
393
395
|
*/
|
|
394
|
-
keys(): IterableIterator<number>;
|
|
396
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
395
397
|
/**
|
|
396
398
|
* Returns an list of values in the array
|
|
397
399
|
*/
|
|
398
|
-
values(): IterableIterator<number>;
|
|
400
|
+
values(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
399
401
|
}
|
|
400
402
|
|
|
401
403
|
interface Int32ArrayConstructor {
|
|
@@ -411,19 +413,19 @@ interface Int32ArrayConstructor {
|
|
|
411
413
|
}
|
|
412
414
|
|
|
413
415
|
interface Uint32Array {
|
|
414
|
-
[Symbol.iterator](): IterableIterator<number>;
|
|
416
|
+
[Symbol.iterator](): IterableIterator<number, BuiltinIteratorReturn>;
|
|
415
417
|
/**
|
|
416
418
|
* Returns an array of key, value pairs for every entry in the array
|
|
417
419
|
*/
|
|
418
|
-
entries(): IterableIterator<[number, number]>;
|
|
420
|
+
entries(): IterableIterator<[number, number], BuiltinIteratorReturn>;
|
|
419
421
|
/**
|
|
420
422
|
* Returns an list of keys in the array
|
|
421
423
|
*/
|
|
422
|
-
keys(): IterableIterator<number>;
|
|
424
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
423
425
|
/**
|
|
424
426
|
* Returns an list of values in the array
|
|
425
427
|
*/
|
|
426
|
-
values(): IterableIterator<number>;
|
|
428
|
+
values(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
427
429
|
}
|
|
428
430
|
|
|
429
431
|
interface Uint32ArrayConstructor {
|
|
@@ -439,19 +441,19 @@ interface Uint32ArrayConstructor {
|
|
|
439
441
|
}
|
|
440
442
|
|
|
441
443
|
interface Float32Array {
|
|
442
|
-
[Symbol.iterator](): IterableIterator<number>;
|
|
444
|
+
[Symbol.iterator](): IterableIterator<number, BuiltinIteratorReturn>;
|
|
443
445
|
/**
|
|
444
446
|
* Returns an array of key, value pairs for every entry in the array
|
|
445
447
|
*/
|
|
446
|
-
entries(): IterableIterator<[number, number]>;
|
|
448
|
+
entries(): IterableIterator<[number, number], BuiltinIteratorReturn>;
|
|
447
449
|
/**
|
|
448
450
|
* Returns an list of keys in the array
|
|
449
451
|
*/
|
|
450
|
-
keys(): IterableIterator<number>;
|
|
452
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
451
453
|
/**
|
|
452
454
|
* Returns an list of values in the array
|
|
453
455
|
*/
|
|
454
|
-
values(): IterableIterator<number>;
|
|
456
|
+
values(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
455
457
|
}
|
|
456
458
|
|
|
457
459
|
interface Float32ArrayConstructor {
|
|
@@ -467,19 +469,19 @@ interface Float32ArrayConstructor {
|
|
|
467
469
|
}
|
|
468
470
|
|
|
469
471
|
interface Float64Array {
|
|
470
|
-
[Symbol.iterator](): IterableIterator<number>;
|
|
472
|
+
[Symbol.iterator](): IterableIterator<number, BuiltinIteratorReturn>;
|
|
471
473
|
/**
|
|
472
474
|
* Returns an array of key, value pairs for every entry in the array
|
|
473
475
|
*/
|
|
474
|
-
entries(): IterableIterator<[number, number]>;
|
|
476
|
+
entries(): IterableIterator<[number, number], BuiltinIteratorReturn>;
|
|
475
477
|
/**
|
|
476
478
|
* Returns an list of keys in the array
|
|
477
479
|
*/
|
|
478
|
-
keys(): IterableIterator<number>;
|
|
480
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
479
481
|
/**
|
|
480
482
|
* Returns an list of values in the array
|
|
481
483
|
*/
|
|
482
|
-
values(): IterableIterator<number>;
|
|
484
|
+
values(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
483
485
|
}
|
|
484
486
|
|
|
485
487
|
interface Float64ArrayConstructor {
|
|
@@ -27,17 +27,17 @@ 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 = unknown> {
|
|
31
31
|
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
32
32
|
next(...args: [] | [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 = unknown> {
|
|
38
|
+
[Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
interface AsyncIterableIterator<T> extends AsyncIterator<T> {
|
|
42
|
-
[Symbol.asyncIterator](): AsyncIterableIterator<T>;
|
|
41
|
+
interface AsyncIterableIterator<T, TReturn = any, TNext = unknown> extends AsyncIterator<T, TReturn, TNext> {
|
|
42
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<T, TReturn, TNext>;
|
|
43
43
|
}
|
|
@@ -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(): IterableIterator<[number, bigint]>;
|
|
174
|
+
entries(): IterableIterator<[number, bigint], BuiltinIteratorReturn>;
|
|
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(): IterableIterator<number>;
|
|
259
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
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(): IterableIterator<bigint>;
|
|
381
|
+
values(): IterableIterator<bigint, BuiltinIteratorReturn>;
|
|
382
382
|
|
|
383
|
-
[Symbol.iterator](): IterableIterator<bigint>;
|
|
383
|
+
[Symbol.iterator](): IterableIterator<bigint, BuiltinIteratorReturn>;
|
|
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(): IterableIterator<[number, bigint]>;
|
|
446
|
+
entries(): IterableIterator<[number, bigint], BuiltinIteratorReturn>;
|
|
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(): IterableIterator<number>;
|
|
531
|
+
keys(): IterableIterator<number, BuiltinIteratorReturn>;
|
|
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(): IterableIterator<bigint>;
|
|
653
|
+
values(): IterableIterator<bigint, BuiltinIteratorReturn>;
|
|
654
654
|
|
|
655
|
-
[Symbol.iterator](): IterableIterator<bigint>;
|
|
655
|
+
[Symbol.iterator](): IterableIterator<bigint, BuiltinIteratorReturn>;
|
|
656
656
|
|
|
657
657
|
readonly [Symbol.toStringTag]: "BigUint64Array";
|
|
658
658
|
|
|
@@ -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): IterableIterator<RegExpExecArray>;
|
|
27
|
+
matchAll(regexp: RegExp): IterableIterator<RegExpExecArray, BuiltinIteratorReturn>;
|
|
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;
|
|
@@ -33,5 +33,5 @@ interface RegExp {
|
|
|
33
33
|
* containing the results of that search.
|
|
34
34
|
* @param string A string to search within.
|
|
35
35
|
*/
|
|
36
|
-
[Symbol.matchAll](str: string): IterableIterator<RegExpMatchArray>;
|
|
36
|
+
[Symbol.matchAll](str: string): IterableIterator<RegExpMatchArray, BuiltinIteratorReturn>;
|
|
37
37
|
}
|
package/lib/lib.es2022.intl.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ declare namespace Intl {
|
|
|
55
55
|
containing(codeUnitIndex?: number): SegmentData;
|
|
56
56
|
|
|
57
57
|
/** Returns an iterator to iterate over the segments. */
|
|
58
|
-
[Symbol.iterator](): IterableIterator<SegmentData>;
|
|
58
|
+
[Symbol.iterator](): IterableIterator<SegmentData, BuiltinIteratorReturn>;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
interface SegmentData {
|
|
@@ -27,3 +27,80 @@ interface MapConstructor {
|
|
|
27
27
|
keySelector: (item: T, index: number) => K,
|
|
28
28
|
): Map<K, T[]>;
|
|
29
29
|
}
|
|
30
|
+
|
|
31
|
+
interface ReadonlySetLike<T> {
|
|
32
|
+
/**
|
|
33
|
+
* Despite its name, returns an iterator of the values in the set-like.
|
|
34
|
+
*/
|
|
35
|
+
keys(): Iterator<T>;
|
|
36
|
+
/**
|
|
37
|
+
* @returns a boolean indicating whether an element with the specified value exists in the set-like or not.
|
|
38
|
+
*/
|
|
39
|
+
has(value: T): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* @returns the number of (unique) elements in the set-like.
|
|
42
|
+
*/
|
|
43
|
+
readonly size: number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface Set<T> {
|
|
47
|
+
/**
|
|
48
|
+
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
|
|
49
|
+
*/
|
|
50
|
+
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
51
|
+
/**
|
|
52
|
+
* @returns a new Set containing all the elements which are both in this Set and in the argument.
|
|
53
|
+
*/
|
|
54
|
+
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
|
|
55
|
+
/**
|
|
56
|
+
* @returns a new Set containing all the elements in this Set which are not also in the argument.
|
|
57
|
+
*/
|
|
58
|
+
difference<U>(other: ReadonlySetLike<U>): Set<T>;
|
|
59
|
+
/**
|
|
60
|
+
* @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
|
|
61
|
+
*/
|
|
62
|
+
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
63
|
+
/**
|
|
64
|
+
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
|
|
65
|
+
*/
|
|
66
|
+
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
|
|
69
|
+
*/
|
|
70
|
+
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* @returns a boolean indicating whether this Set has no elements in common with the argument.
|
|
73
|
+
*/
|
|
74
|
+
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface ReadonlySet<T> {
|
|
78
|
+
/**
|
|
79
|
+
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
|
|
80
|
+
*/
|
|
81
|
+
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
82
|
+
/**
|
|
83
|
+
* @returns a new Set containing all the elements which are both in this Set and in the argument.
|
|
84
|
+
*/
|
|
85
|
+
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
|
|
86
|
+
/**
|
|
87
|
+
* @returns a new Set containing all the elements in this Set which are not also in the argument.
|
|
88
|
+
*/
|
|
89
|
+
difference<U>(other: ReadonlySetLike<U>): Set<T>;
|
|
90
|
+
/**
|
|
91
|
+
* @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
|
|
92
|
+
*/
|
|
93
|
+
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
94
|
+
/**
|
|
95
|
+
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
|
|
96
|
+
*/
|
|
97
|
+
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
|
|
100
|
+
*/
|
|
101
|
+
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* @returns a boolean indicating whether this Set has no elements in common with the argument.
|
|
104
|
+
*/
|
|
105
|
+
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
|
|
106
|
+
}
|