Skip to content

Commit

Permalink
chore: upgrade TypeScript to 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
uhyo committed Mar 24, 2024
1 parent 5394ba9 commit 49823a7
Show file tree
Hide file tree
Showing 34 changed files with 1,035 additions and 506 deletions.
2 changes: 1 addition & 1 deletion TypeScript
Submodule TypeScript updated 3289 files
32 changes: 17 additions & 15 deletions docs/diff/dom.generated.d.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Index: dom.generated.d.ts
===================================================================
--- dom.generated.d.ts
+++ dom.generated.d.ts
@@ -2943,11 +2943,16 @@
@@ -2944,11 +2944,16 @@
};

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

declare var AudioParamMap: {
@@ -3364,9 +3369,9 @@
@@ -3369,9 +3374,9 @@
blob(): Promise<Blob>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
formData(): Promise<FormData>;
Expand All @@ -36,7 +36,7 @@ Index: dom.generated.d.ts
text(): Promise<string>;
}

@@ -8828,11 +8833,11 @@
@@ -8872,11 +8877,11 @@
};

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

declare var EventCounts: {
@@ -9374,11 +9379,16 @@
@@ -9420,11 +9425,16 @@
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check) */
check(font: string, text?: string): boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load) */
Expand All @@ -71,7 +71,7 @@ Index: dom.generated.d.ts
addEventListener<K extends keyof FontFaceSetEventMap>(
type: K,
listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any,
@@ -17020,11 +17030,16 @@
@@ -17139,11 +17149,16 @@
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIInputMap)
*/
Expand All @@ -91,7 +91,7 @@ Index: dom.generated.d.ts
}

declare var MIDIInputMap: {
@@ -17087,11 +17102,16 @@
@@ -17206,11 +17221,16 @@
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutputMap)
*/
Expand All @@ -111,7 +111,7 @@ Index: dom.generated.d.ts
}

declare var MIDIOutputMap: {
@@ -21372,11 +21392,11 @@
@@ -21527,11 +21547,11 @@
};

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

declare var RTCStatsReport: {
@@ -34051,13 +34071,20 @@
@@ -34291,13 +34311,16 @@
handler: TimerHandler,
timeout?: number,
...arguments: any[]
Expand All @@ -135,11 +135,7 @@ Index: dom.generated.d.ts
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
-declare function structuredClone<T = any>(
+declare function structuredClone<
+ const T extends BetterTypeScriptLibInternals.StructuredClone.NeverOrUnknown<
+ BetterTypeScriptLibInternals.StructuredClone.StructuredCloneOutput<
+ BetterTypeScriptLibInternals.StructuredClone.AvoidCyclicConstraint<T>
+ >
+ >,
+ const T extends BetterTypeScriptLibInternals.StructuredClone.Constraint<T>,
+>(
value: T,
options?: StructuredSerializeOptions,
Expand All @@ -149,7 +145,7 @@ Index: dom.generated.d.ts
declare var sessionStorage: Storage;
declare function addEventListener<K extends keyof WindowEventMap>(
type: K,
@@ -34712,4 +34739,119 @@
@@ -34956,4 +34979,125 @@
| "blob"
| "document"
| "json"
Expand Down Expand Up @@ -265,8 +261,14 @@ Index: dom.generated.d.ts
+
+ type AvoidCyclicConstraint<T> = [T] extends [infer R] ? R : never;
+
+ // 上限が不正にきつくなっているのを無視する
+ type NeverOrUnknown<T> = [T] extends [never] ? never : unknown;
+
+ export type Constraint<T> =
+ BetterTypeScriptLibInternals.StructuredClone.NeverOrUnknown<
+ BetterTypeScriptLibInternals.StructuredClone.StructuredCloneOutput<
+ BetterTypeScriptLibInternals.StructuredClone.AvoidCyclicConstraint<T>
+ >
+ >;
+ }
+}

Expand Down
Loading

0 comments on commit 49823a7

Please sign in to comment.