Skip to content

Commit 259e979

Browse files
authored
chore: upgrade TypeScript to 5.9 (#78)
* chore: update TypeScript version * fix: upgrade @types/node to the latest * chore: reflect TS 5.9 types to generated * fix: reflect TS 5.9 type defs to replaced types
1 parent 3596dd1 commit 259e979

20 files changed

+19738
-6398
lines changed

TypeScript

Submodule TypeScript updated 1570 files

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

Lines changed: 71 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Index: dom.generated.d.ts
55
===================================================================
66
--- dom.generated.d.ts
77
+++ dom.generated.d.ts
8-
@@ -3356,11 +3356,16 @@
9-
};
10-
11-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParamMap) */
8+
@@ -4053,11 +4053,16 @@
9+
*
10+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParamMap)
11+
*/
1212
interface AudioParamMap {
1313
- forEach(
1414
- callbackfn: (value: AudioParam, key: string, parent: AudioParamMap) => void,
@@ -25,8 +25,8 @@ Index: dom.generated.d.ts
2525
}
2626

2727
declare var AudioParamMap: {
28-
@@ -3789,9 +3794,9 @@
29-
bytes(): Promise<Uint8Array>;
28+
@@ -4721,9 +4726,9 @@
29+
bytes(): Promise<Uint8Array<ArrayBuffer>>;
3030
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
3131
formData(): Promise<FormData>;
3232
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
@@ -36,10 +36,10 @@ Index: dom.generated.d.ts
3636
text(): Promise<string>;
3737
}
3838

39-
@@ -7044,11 +7049,11 @@
40-
};
41-
42-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomStateSet) */
39+
@@ -9110,11 +9115,11 @@
40+
*
41+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomStateSet)
42+
*/
4343
interface CustomStateSet {
4444
- forEach(
4545
- callbackfn: (value: string, key: string, parent: CustomStateSet) => void,
@@ -51,32 +51,37 @@ Index: dom.generated.d.ts
5151
}
5252

5353
declare var CustomStateSet: {
54-
@@ -8530,9 +8535,9 @@
55-
/**
56-
* Returns a reference to the first object with the specified value of the ID attribute.
57-
* @param elementId String that specifies the ID value.
54+
@@ -10953,10 +10958,14 @@
55+
*
56+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/exitPointerLock)
5857
*/
58+
exitPointerLock(): void;
5959
- getElementById(elementId: string): HTMLElement | null;
60-
+ getElementById(elementId: string): Element | null;
6160
/**
62-
* Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
61+
+ * Returns a reference to the first object with the specified value of the ID attribute.
62+
+ * @param elementId String that specifies the ID value.
63+
+ */
64+
+ getElementById(elementId: string): Element | null;
65+
+ /**
66+
* The **`getElementsByClassName`** method of of all child elements which have all of the given class name(s).
6367
*
6468
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/getElementsByClassName)
65-
@@ -8719,9 +8724,9 @@
69+
*/
70+
@@ -11133,9 +11142,9 @@
6671
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DocumentFragment)
6772
*/
6873
interface DocumentFragment extends Node, NonElementParentNode, ParentNode {
6974
readonly ownerDocument: Document;
7075
- getElementById(elementId: string): HTMLElement | null;
7176
+ getElementById(elementId: string): Element | null;
77+
/** [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent) */
78+
get textContent(): string;
79+
set textContent(value: string | null);
7280
}
73-
74-
declare var DocumentFragment: {
75-
prototype: DocumentFragment;
76-
@@ -9542,11 +9547,11 @@
77-
};
78-
79-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventCounts) */
81+
@@ -12257,11 +12266,11 @@
82+
*
83+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventCounts)
84+
*/
8085
interface EventCounts {
8186
- forEach(
8287
- callbackfn: (value: number, key: string, parent: EventCounts) => void,
@@ -88,10 +93,10 @@ Index: dom.generated.d.ts
8893
}
8994

9095
declare var EventCounts: {
91-
@@ -10078,11 +10083,16 @@
92-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check) */
93-
check(font: string, text?: string): boolean;
94-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load) */
96+
@@ -13038,11 +13047,16 @@
97+
*
98+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load)
99+
*/
95100
load(font: string, text?: string): Promise<FontFace[]>;
96101
- forEach(
97102
- callbackfn: (value: FontFace, key: FontFace, parent: FontFaceSet) => void,
@@ -108,10 +113,10 @@ Index: dom.generated.d.ts
108113
addEventListener<K extends keyof FontFaceSetEventMap>(
109114
type: K,
110115
listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any,
111-
@@ -16529,15 +16539,16 @@
112-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight/priority) */
113-
priority: number;
114-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight/type) */
116+
@@ -20056,15 +20070,16 @@
117+
*
118+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight/type)
119+
*/
115120
type: HighlightType;
116121
- forEach(
117122
+ forEach<This = undefined>(
@@ -128,10 +133,10 @@ Index: dom.generated.d.ts
128133
}
129134

130135
declare var Highlight: {
131-
@@ -16546,15 +16557,16 @@
132-
};
133-
134-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HighlightRegistry) */
136+
@@ -20077,15 +20092,16 @@
137+
*
138+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HighlightRegistry)
139+
*/
135140
interface HighlightRegistry {
136141
- forEach(
137142
+ forEach<This = undefined>(
@@ -148,7 +153,7 @@ Index: dom.generated.d.ts
148153
}
149154

150155
declare var HighlightRegistry: {
151-
@@ -18046,11 +18058,16 @@
156+
@@ -21942,11 +21958,16 @@
152157
*
153158
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIInputMap)
154159
*/
@@ -168,7 +173,7 @@ Index: dom.generated.d.ts
168173
}
169174

170175
declare var MIDIInputMap: {
171-
@@ -18113,11 +18130,16 @@
176+
@@ -22020,11 +22041,16 @@
172177
*
173178
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutputMap)
174179
*/
@@ -188,21 +193,37 @@ Index: dom.generated.d.ts
188193
}
189194

190195
declare var MIDIOutputMap: {
191-
@@ -20007,9 +20029,9 @@
196+
@@ -24447,13 +24473,13 @@
197+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument)
198+
*/
199+
readonly ownerDocument: Document | null;
200+
/**
201+
- * The read-only **`parentElement`** property of Node interface returns the DOM node's parent Element, or `null` if the node either has no parent, or its parent isn't a DOM Element.
202+
+ * Returns the parent element.
203+
*
204+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentElement)
205+
*/
206+
- readonly parentElement: HTMLElement | null;
207+
+ readonly parentElement: Element | null;
208+
/**
209+
* The read-only **`parentNode`** property of the Node interface returns the parent of the specified node in the DOM tree.
210+
*
211+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentNode)
212+
@@ -24722,9 +24748,9 @@
192213
new (): NodeList;
193214
};
194215

195216
interface NodeListOf<TNode extends Node> extends NodeList {
196217
- item(index: number): TNode;
197218
+ item(index: number): TNode | null;
198-
/**
199-
* Performs the specified action for each node in an list.
200-
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
201-
* @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.
202-
@@ -22578,11 +22600,11 @@
203-
};
204-
205-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCStatsReport) */
219+
forEach(
220+
callbackfn: (value: TNode, key: number, parent: NodeListOf<TNode>) => void,
221+
thisArg?: any,
222+
): void;
223+
@@ -28693,11 +28719,11 @@
224+
*
225+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCStatsReport)
226+
*/
206227
interface RTCStatsReport {
207228
- forEach(
208229
- callbackfn: (value: any, key: string, parent: RTCStatsReport) => void,
@@ -214,7 +235,7 @@ Index: dom.generated.d.ts
214235
}
215236

216237
declare var RTCStatsReport: {
217-
@@ -29203,15 +29225,11 @@
238+
@@ -38390,15 +38416,11 @@
218239
new (): ViewTransition;
219240
};
220241

@@ -233,7 +254,7 @@ Index: dom.generated.d.ts
233254
}
234255

235256
declare var ViewTransitionTypeSet: {
236-
@@ -35597,13 +35615,16 @@
257+
@@ -45428,13 +45450,16 @@
237258
handler: TimerHandler,
238259
timeout?: number,
239260
...arguments: any[]
@@ -253,7 +274,7 @@ Index: dom.generated.d.ts
253274
declare var sessionStorage: Storage;
254275
declare function addEventListener<K extends keyof WindowEventMap>(
255276
type: K,
256-
@@ -36287,4 +36308,125 @@
277+
@@ -46126,4 +46151,125 @@
257278
| "blob"
258279
| "document"
259280
| "json"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Index: es2015.core.d.ts
120120
- source3: W,
121121
- ): T & U & V & W;
122122
+ ...sources: Ts
123-
+ ): Intersect<[T, ...Ts]>;
123+
+ ): T & Intersect<Ts>;
124124

125125
/**
126126
- * Copy the values of all of the enumerable own properties from one or more source objects to a

0 commit comments

Comments
 (0)