Skip to content

Commit 422ccd9

Browse files
authored
feat: upgrade to TS 5.5 (#45)
* chore: upgrade TypeScript to 5.5.3 * chore: upgrade TS to 5.5.3 * chore: reflect TS 5.5 types * fix: tests pass
1 parent 7bfcc5b commit 422ccd9

32 files changed

+767
-216
lines changed

TypeScript

Submodule TypeScript updated 20274 files

docs/diff/dom.generated.d.ts.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Index: dom.generated.d.ts
55
===================================================================
66
--- dom.generated.d.ts
77
+++ dom.generated.d.ts
8-
@@ -2944,11 +2944,16 @@
8+
@@ -2969,11 +2969,16 @@
99
};
1010

1111
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParamMap) */
@@ -25,7 +25,7 @@ Index: dom.generated.d.ts
2525
}
2626

2727
declare var AudioParamMap: {
28-
@@ -3369,9 +3374,9 @@
28+
@@ -3394,9 +3399,9 @@
2929
blob(): Promise<Blob>;
3030
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
3131
formData(): Promise<FormData>;
@@ -36,7 +36,22 @@ Index: dom.generated.d.ts
3636
text(): Promise<string>;
3737
}
3838

39-
@@ -8872,11 +8877,11 @@
39+
@@ -6530,11 +6535,11 @@
40+
};
41+
42+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomStateSet) */
43+
interface CustomStateSet {
44+
- forEach(
45+
- callbackfn: (value: string, key: string, parent: CustomStateSet) => void,
46+
- thisArg?: any,
47+
+ forEach<This = undefined>(
48+
+ callbackfn: (this: This, value: string, key: string, parent: this) => void,
49+
+ thisArg?: This,
50+
): void;
51+
}
52+
53+
declare var CustomStateSet: {
54+
@@ -8960,11 +8965,11 @@
4055
};
4156

4257
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventCounts) */
@@ -51,7 +66,7 @@ Index: dom.generated.d.ts
5166
}
5267

5368
declare var EventCounts: {
54-
@@ -9420,11 +9425,16 @@
69+
@@ -9508,11 +9513,16 @@
5570
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check) */
5671
check(font: string, text?: string): boolean;
5772
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load) */
@@ -71,7 +86,7 @@ Index: dom.generated.d.ts
7186
addEventListener<K extends keyof FontFaceSetEventMap>(
7287
type: K,
7388
listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any,
74-
@@ -15711,15 +15721,16 @@
89+
@@ -15863,15 +15873,16 @@
7590
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight/priority) */
7691
priority: number;
7792
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight/type) */
@@ -91,7 +106,7 @@ Index: dom.generated.d.ts
91106
}
92107

93108
declare var Highlight: {
94-
@@ -15728,15 +15739,16 @@
109+
@@ -15880,15 +15891,16 @@
95110
};
96111

97112
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HighlightRegistry) */
@@ -111,7 +126,7 @@ Index: dom.generated.d.ts
111126
}
112127

113128
declare var HighlightRegistry: {
114-
@@ -17139,11 +17151,16 @@
129+
@@ -17314,11 +17326,16 @@
115130
*
116131
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIInputMap)
117132
*/
@@ -131,7 +146,7 @@ Index: dom.generated.d.ts
131146
}
132147

133148
declare var MIDIInputMap: {
134-
@@ -17206,11 +17223,16 @@
149+
@@ -17381,11 +17398,16 @@
135150
*
136151
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutputMap)
137152
*/
@@ -151,7 +166,7 @@ Index: dom.generated.d.ts
151166
}
152167

153168
declare var MIDIOutputMap: {
154-
@@ -19085,9 +19107,9 @@
169+
@@ -19260,9 +19282,9 @@
155170
new (): NodeList;
156171
};
157172

@@ -162,7 +177,7 @@ Index: dom.generated.d.ts
162177
* Performs the specified action for each node in an list.
163178
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
164179
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
165-
@@ -21527,11 +21549,11 @@
180+
@@ -21702,11 +21724,11 @@
166181
};
167182

168183
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCStatsReport) */
@@ -177,7 +192,7 @@ Index: dom.generated.d.ts
177192
}
178193

179194
declare var RTCStatsReport: {
180-
@@ -34291,13 +34313,16 @@
195+
@@ -34477,13 +34499,16 @@
181196
handler: TimerHandler,
182197
timeout?: number,
183198
...arguments: any[]
@@ -196,7 +211,7 @@ Index: dom.generated.d.ts
196211
declare var sessionStorage: Storage;
197212
declare function addEventListener<K extends keyof WindowEventMap>(
198213
type: K,
199-
@@ -34956,4 +34981,125 @@
214+
@@ -35141,4 +35166,125 @@
200215
| "blob"
201216
| "document"
202217
| "json"

docs/diff/es2015.core.d.ts.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Index: es2015.core.d.ts
5252

5353
/**
5454
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
55-
@@ -54,23 +64,23 @@
55+
@@ -59,23 +69,23 @@
5656
}
5757

5858
interface ArrayConstructor {
@@ -85,7 +85,7 @@ Index: es2015.core.d.ts
8585

8686
/**
8787
* Returns a new array from a set of elements.
88-
@@ -273,49 +283,20 @@
88+
@@ -278,49 +288,20 @@
8989
/**
9090
* Copy the values of all of the enumerable own properties from one or more source objects to a
9191
* target object. Returns the target object.
@@ -140,7 +140,7 @@ Index: es2015.core.d.ts
140140
/**
141141
* Returns the names of the enumerable string properties and methods of an object.
142142
* @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.
143-
@@ -326,16 +307,23 @@
143+
@@ -331,16 +312,23 @@
144144
* Returns true if the values are the same value, false otherwise.
145145
* @param value1 The first value.
146146
* @param value2 The second value.
@@ -166,7 +166,7 @@ Index: es2015.core.d.ts
166166

167167
interface ReadonlyArray<T> {
168168
/**
169-
@@ -346,15 +334,25 @@
169+
@@ -351,15 +339,25 @@
170170
* immediately returns that element value. Otherwise, find returns undefined.
171171
* @param thisArg If provided, it will be used as the this value for each invocation of
172172
* predicate. If it is not provided, undefined is used instead.
@@ -198,7 +198,7 @@ Index: es2015.core.d.ts
198198

199199
/**
200200
* Returns the index of the first element in the array where predicate is true, and -1
201-
@@ -364,11 +362,11 @@
201+
@@ -369,11 +367,11 @@
202202
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
203203
* @param thisArg If provided, it will be used as the this value for each invocation of
204204
* predicate. If it is not provided, undefined is used instead.
@@ -210,10 +210,10 @@ Index: es2015.core.d.ts
210210
+ predicate: (this: This, value: T, index: number, obj: this) => boolean,
211211
+ thisArg?: This,
212212
): number;
213-
}
214213

215-
interface RegExp {
216-
@@ -428,26 +426,17 @@
214+
toLocaleString(
215+
locales: string | string[],
216+
@@ -438,26 +436,17 @@
217217
* same as the corresponding elements of this object (converted to a String) starting at
218218
* endPosition – length(this). Otherwise returns false.
219219
*/

docs/diff/es2020.bigint.d.ts.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ Index: es2020.bigint.d.ts
267267

268268
/**
269269
* Sorts the array.
270-
@@ -545,20 +558,23 @@
270+
@@ -548,20 +561,23 @@
271271
* Returns a new array from a set of elements.
272272
* @param items A set of elements to include in the new array object.
273273
*/
@@ -297,7 +297,7 @@ Index: es2020.bigint.d.ts
297297
}
298298

299299
declare var BigInt64Array: BigInt64ArrayConstructor;
300-
@@ -592,20 +608,24 @@
300+
@@ -595,20 +611,24 @@
301301
copyWithin(target: number, start: number, end?: number): this;
302302

303303
/** Yields index, value pairs for every entry in the array. */
@@ -326,7 +326,7 @@ Index: es2020.bigint.d.ts
326326

327327
/**
328328
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
329-
@@ -615,21 +635,24 @@
329+
@@ -618,21 +638,24 @@
330330
* @param end index to stop filling the array at. If end is negative, it is treated as
331331
* length+end.
332332
*/
@@ -356,7 +356,7 @@ Index: es2020.bigint.d.ts
356356
* Returns the value of the first element in the array where predicate is true, and undefined
357357
* otherwise.
358358
* @param predicate find calls predicate once for each element of the array, in ascending
359-
@@ -637,13 +660,17 @@
359+
@@ -640,13 +663,17 @@
360360
* immediately returns that element value. Otherwise, find returns undefined.
361361
* @param thisArg If provided, it will be used as the this value for each invocation of
362362
* predicate. If it is not provided, undefined is used instead.
@@ -378,7 +378,7 @@ Index: es2020.bigint.d.ts
378378
* Returns the index of the first element in the array where predicate is true, and -1
379379
* otherwise.
380380
* @param predicate find calls predicate once for each element of the array, in ascending
381-
@@ -651,23 +678,27 @@
381+
@@ -654,23 +681,27 @@
382382
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
383383
* @param thisArg If provided, it will be used as the this value for each invocation of
384384
* predicate. If it is not provided, undefined is used instead.
@@ -413,7 +413,7 @@ Index: es2020.bigint.d.ts
413413

414414
/**
415415
* Determines whether an array includes a certain element, returning true or false as appropriate.
416-
@@ -703,41 +734,40 @@
416+
@@ -706,41 +737,40 @@
417417
lastIndexOf(searchElement: bigint, fromIndex?: number): number;
418418

419419
/** The length of the array. */
@@ -468,7 +468,7 @@ Index: es2020.bigint.d.ts
468468
* Calls the specified callback function for all the elements in an array. The return value of
469469
* the callback function is the accumulated result, and is provided as an argument in the next
470470
* call to the callback function.
471-
@@ -746,37 +776,32 @@
471+
@@ -749,37 +779,32 @@
472472
* @param initialValue If initialValue is specified, it is used as the initial value to start
473473
* the accumulation. The first call to the callbackfn function provides this value as an argument
474474
* instead of an array value.
@@ -513,7 +513,7 @@ Index: es2020.bigint.d.ts
513513
* Calls the specified callback function for all the elements in an array, in descending order.
514514
* The return value of the callback function is the accumulated result, and is provided as an
515515
* argument in the next call to the callback function.
516-
@@ -785,14 +810,14 @@
516+
@@ -788,14 +813,14 @@
517517
* @param initialValue If initialValue is specified, it is used as the initial value to start
518518
* the accumulation. The first call to the callbackfn function provides this value as an argument
519519
* instead of an array value.
@@ -530,7 +530,7 @@ Index: es2020.bigint.d.ts
530530
initialValue: U,
531531
): U;
532532

533-
@@ -811,20 +836,24 @@
533+
@@ -814,20 +839,24 @@
534534
* @param start The beginning of the specified portion of the array.
535535
* @param end The end of the specified portion of the array.
536536
*/
@@ -559,7 +559,7 @@ Index: es2020.bigint.d.ts
559559

560560
/**
561561
* Sorts the array.
562-
@@ -876,20 +905,23 @@
562+
@@ -882,20 +911,23 @@
563563
* Returns a new array from a set of elements.
564564
* @param items A set of elements to include in the new array object.
565565
*/

docs/diff/es5.d.ts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3570,7 +3570,7 @@ Index: es5.d.ts
35703570
}
35713571
declare var Float64Array: Float64ArrayConstructor;
35723572

3573-
@@ -5551,4 +5465,33 @@
3573+
@@ -5584,4 +5498,33 @@
35743574
locales?: string | string[],
35753575
options?: Intl.DateTimeFormatOptions,
35763576
): string;

generated/lib.dom.asynciterable.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@ interface FileSystemDirectoryHandle {
99
keys(): AsyncIterableIterator<string>;
1010
values(): AsyncIterableIterator<FileSystemHandle>;
1111
}
12+
13+
interface ReadableStream<R = any> {
14+
[Symbol.asyncIterator](
15+
options?: ReadableStreamIteratorOptions,
16+
): AsyncIterableIterator<R>;
17+
values(options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
18+
}

0 commit comments

Comments
 (0)