Skip to content

Commit 95f5fe3

Browse files
authored
Merge pull request #39 from uhyo/up-ts-5.4
chore: upgrade TypeScript to 5.4
2 parents 5394ba9 + cc6ddca commit 95f5fe3

35 files changed

+1108
-508
lines changed

TypeScript

Submodule TypeScript updated 3289 files

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

Lines changed: 57 additions & 15 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-
@@ -2943,11 +2943,16 @@
8+
@@ -2944,11 +2944,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-
@@ -3364,9 +3369,9 @@
28+
@@ -3369,9 +3374,9 @@
2929
blob(): Promise<Blob>;
3030
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
3131
formData(): Promise<FormData>;
@@ -36,7 +36,7 @@ Index: dom.generated.d.ts
3636
text(): Promise<string>;
3737
}
3838

39-
@@ -8828,11 +8833,11 @@
39+
@@ -8872,11 +8877,11 @@
4040
};
4141

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

5353
declare var EventCounts: {
54-
@@ -9374,11 +9379,16 @@
54+
@@ -9420,11 +9425,16 @@
5555
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check) */
5656
check(font: string, text?: string): boolean;
5757
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load) */
@@ -71,7 +71,47 @@ Index: dom.generated.d.ts
7171
addEventListener<K extends keyof FontFaceSetEventMap>(
7272
type: K,
7373
listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any,
74-
@@ -17020,11 +17030,16 @@
74+
@@ -15711,15 +15721,16 @@
75+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight/priority) */
76+
priority: number;
77+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight/type) */
78+
type: HighlightType;
79+
- forEach(
80+
+ forEach<This = undefined>(
81+
callbackfn: (
82+
+ this: This,
83+
value: AbstractRange,
84+
key: AbstractRange,
85+
- parent: Highlight,
86+
+ parent: this,
87+
) => void,
88+
- thisArg?: any,
89+
+ thisArg?: This,
90+
): void;
91+
}
92+
93+
declare var Highlight: {
94+
@@ -15728,15 +15739,16 @@
95+
};
96+
97+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HighlightRegistry) */
98+
interface HighlightRegistry {
99+
- forEach(
100+
+ forEach<This = undefined>(
101+
callbackfn: (
102+
+ this: This,
103+
value: Highlight,
104+
key: string,
105+
- parent: HighlightRegistry,
106+
+ parent: this,
107+
) => void,
108+
- thisArg?: any,
109+
+ thisArg?: This,
110+
): void;
111+
}
112+
113+
declare var HighlightRegistry: {
114+
@@ -17139,11 +17151,16 @@
75115
*
76116
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIInputMap)
77117
*/
@@ -91,7 +131,7 @@ Index: dom.generated.d.ts
91131
}
92132

93133
declare var MIDIInputMap: {
94-
@@ -17087,11 +17102,16 @@
134+
@@ -17206,11 +17223,16 @@
95135
*
96136
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutputMap)
97137
*/
@@ -111,7 +151,7 @@ Index: dom.generated.d.ts
111151
}
112152

113153
declare var MIDIOutputMap: {
114-
@@ -21372,11 +21392,11 @@
154+
@@ -21527,11 +21549,11 @@
115155
};
116156

117157
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCStatsReport) */
@@ -126,7 +166,7 @@ Index: dom.generated.d.ts
126166
}
127167

128168
declare var RTCStatsReport: {
129-
@@ -34051,13 +34071,20 @@
169+
@@ -34291,13 +34313,16 @@
130170
handler: TimerHandler,
131171
timeout?: number,
132172
...arguments: any[]
@@ -135,11 +175,7 @@ Index: dom.generated.d.ts
135175
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
136176
-declare function structuredClone<T = any>(
137177
+declare function structuredClone<
138-
+ const T extends BetterTypeScriptLibInternals.StructuredClone.NeverOrUnknown<
139-
+ BetterTypeScriptLibInternals.StructuredClone.StructuredCloneOutput<
140-
+ BetterTypeScriptLibInternals.StructuredClone.AvoidCyclicConstraint<T>
141-
+ >
142-
+ >,
178+
+ const T extends BetterTypeScriptLibInternals.StructuredClone.Constraint<T>,
143179
+>(
144180
value: T,
145181
options?: StructuredSerializeOptions,
@@ -149,7 +185,7 @@ Index: dom.generated.d.ts
149185
declare var sessionStorage: Storage;
150186
declare function addEventListener<K extends keyof WindowEventMap>(
151187
type: K,
152-
@@ -34712,4 +34739,119 @@
188+
@@ -34956,4 +34981,125 @@
153189
| "blob"
154190
| "document"
155191
| "json"
@@ -265,8 +301,14 @@ Index: dom.generated.d.ts
265301
+
266302
+ type AvoidCyclicConstraint<T> = [T] extends [infer R] ? R : never;
267303
+
268-
+ // 上限が不正にきつくなっているのを無視する
269304
+ type NeverOrUnknown<T> = [T] extends [never] ? never : unknown;
305+
+
306+
+ export type Constraint<T> =
307+
+ BetterTypeScriptLibInternals.StructuredClone.NeverOrUnknown<
308+
+ BetterTypeScriptLibInternals.StructuredClone.StructuredCloneOutput<
309+
+ BetterTypeScriptLibInternals.StructuredClone.AvoidCyclicConstraint<T>
310+
+ >
311+
+ >;
270312
+ }
271313
+}
272314

0 commit comments

Comments
 (0)