Skip to content

Commit 052b1c6

Browse files
committed
chore: upgrade TypeScript to 4.5.0-beta
1 parent f990ec3 commit 052b1c6

27 files changed

+1402
-2833
lines changed

TypeScript

Submodule TypeScript updated 2371 files

generated/lib.dom.generated.d.ts

Lines changed: 669 additions & 1896 deletions
Large diffs are not rendered by default.

generated/lib.dom.iterable.generated.d.ts

Lines changed: 16 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,11 @@ interface FontFaceSet extends Set<FontFace> {
5858

5959
interface FormData {
6060
[Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>;
61-
/**
62-
* Returns an array of key, value pairs for every entry in the list.
63-
*/
61+
/** Returns an array of key, value pairs for every entry in the list. */
6462
entries(): IterableIterator<[string, FormDataEntryValue]>;
65-
/**
66-
* Returns a list of keys in the list.
67-
*/
63+
/** Returns a list of keys in the list. */
6864
keys(): IterableIterator<string>;
69-
/**
70-
* Returns a list of values in the list.
71-
*/
65+
/** Returns a list of values in the list. */
7266
values(): IterableIterator<FormDataEntryValue>;
7367
}
7468

@@ -94,24 +88,16 @@ interface HTMLSelectElement {
9488

9589
interface Headers {
9690
[Symbol.iterator](): IterableIterator<[string, string]>;
97-
/**
98-
* Returns an iterator allowing to go through all key/value pairs contained in this object.
99-
*/
91+
/** Returns an iterator allowing to go through all key/value pairs contained in this object. */
10092
entries(): IterableIterator<[string, string]>;
101-
/**
102-
* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object.
103-
*/
93+
/** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
10494
keys(): IterableIterator<string>;
105-
/**
106-
* Returns an iterator allowing to go through all values of the key/value pairs contained in this object.
107-
*/
95+
/** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
10896
values(): IterableIterator<string>;
10997
}
11098

11199
interface IDBDatabase {
112-
/**
113-
* Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names.
114-
*/
100+
/** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */
115101
transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode): IDBTransaction;
116102
}
117103

@@ -155,33 +141,21 @@ interface Navigator {
155141

156142
interface NodeList {
157143
[Symbol.iterator](): IterableIterator<Node>;
158-
/**
159-
* Returns an array of key, value pairs for every entry in the list.
160-
*/
144+
/** Returns an array of key, value pairs for every entry in the list. */
161145
entries(): IterableIterator<[number, Node]>;
162-
/**
163-
* Returns an list of keys in the list.
164-
*/
146+
/** Returns an list of keys in the list. */
165147
keys(): IterableIterator<number>;
166-
/**
167-
* Returns an list of values in the list.
168-
*/
148+
/** Returns an list of values in the list. */
169149
values(): IterableIterator<Node>;
170150
}
171151

172152
interface NodeListOf<TNode extends Node> {
173153
[Symbol.iterator](): IterableIterator<TNode>;
174-
/**
175-
* Returns an array of key, value pairs for every entry in the list.
176-
*/
154+
/** Returns an array of key, value pairs for every entry in the list. */
177155
entries(): IterableIterator<[number, TNode]>;
178-
/**
179-
* Returns an list of keys in the list.
180-
*/
156+
/** Returns an list of keys in the list. */
181157
keys(): IterableIterator<number>;
182-
/**
183-
* Returns an list of values in the list.
184-
*/
158+
/** Returns an list of values in the list. */
185159
values(): IterableIterator<TNode>;
186160
}
187161

@@ -263,17 +237,11 @@ interface TouchList {
263237

264238
interface URLSearchParams {
265239
[Symbol.iterator](): IterableIterator<[string, string]>;
266-
/**
267-
* Returns an array of key, value pairs for every entry in the search params.
268-
*/
240+
/** Returns an array of key, value pairs for every entry in the search params. */
269241
entries(): IterableIterator<[string, string]>;
270-
/**
271-
* Returns a list of keys in the search params.
272-
*/
242+
/** Returns a list of keys in the search params. */
273243
keys(): IterableIterator<string>;
274-
/**
275-
* Returns a list of values in the search params.
276-
*/
244+
/** Returns a list of values in the search params. */
277245
values(): IterableIterator<string>;
278246
}
279247

generated/lib.es2015.core.d.ts

Lines changed: 106 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -154,46 +154,86 @@ interface String {
154154
/**
155155
* Returns an `<a>` HTML anchor element and sets the name attribute to the text value
156156
* @param name
157+
* @deprecated A legacy feature for browser compatibility
157158
*/
158159
anchor(name: string): string;
159160

160-
/** Returns a `<big>` HTML element */
161+
/**
162+
* Returns a `<big>` HTML element
163+
* @deprecated A legacy feature for browser compatibility
164+
*/
161165
big(): string;
162166

163-
/** Returns a `<blink>` HTML element */
167+
/**
168+
* Returns a `<blink>` HTML element
169+
* @deprecated A legacy feature for browser compatibility
170+
*/
164171
blink(): string;
165172

166-
/** Returns a `<b>` HTML element */
173+
/**
174+
* Returns a `<bold>` HTML element
175+
* @deprecated A legacy feature for browser compatibility
176+
*/
167177
bold(): string;
168178

169-
/** Returns a `<tt>` HTML element */
179+
/**
180+
* Returns a `<tt>` HTML element
181+
* @deprecated A legacy feature for browser compatibility
182+
*/
170183
fixed(): string;
171184

172-
/** Returns a `<font>` HTML element and sets the color attribute value */
185+
/**
186+
* Returns a `<font>` HTML element and sets the color attribute value
187+
* @deprecated A legacy feature for browser compatibility
188+
*/
173189
fontcolor(color: string): string;
174190

175-
/** Returns a `<font>` HTML element and sets the size attribute value */
191+
/**
192+
* Returns a `<font>` HTML element and sets the size attribute value
193+
* @deprecated A legacy feature for browser compatibility
194+
*/
176195
fontsize(size: number): string;
177196

178-
/** Returns a `<font>` HTML element and sets the size attribute value */
197+
/**
198+
* Returns a `<font>` HTML element and sets the size attribute value
199+
* @deprecated A legacy feature for browser compatibility
200+
*/
179201
fontsize(size: string): string;
180202

181-
/** Returns an `<i>` HTML element */
203+
/**
204+
* Returns a `<i>` HTML element
205+
* @deprecated A legacy feature for browser compatibility
206+
*/
182207
italics(): string;
183208

184-
/** Returns an `<a>` HTML element and sets the href attribute value */
209+
/**
210+
* Returns an `<a>` HTML element and sets the href attribute value
211+
* @deprecated A legacy feature for browser compatibility
212+
*/
185213
link(url: string): string;
186214

187-
/** Returns a `<small>` HTML element */
215+
/**
216+
* Returns a `<small>` HTML element
217+
* @deprecated A legacy feature for browser compatibility
218+
*/
188219
small(): string;
189220

190-
/** Returns a `<strike>` HTML element */
221+
/**
222+
* Returns a `<strike>` HTML element
223+
* @deprecated A legacy feature for browser compatibility
224+
*/
191225
strike(): string;
192226

193-
/** Returns a `<sub>` HTML element */
227+
/**
228+
* Returns a `<sub>` HTML element
229+
* @deprecated A legacy feature for browser compatibility
230+
*/
194231
sub(): string;
195232

196-
/** Returns a `<sup>` HTML element */
233+
/**
234+
* Returns a `<sup>` HTML element
235+
* @deprecated A legacy feature for browser compatibility
236+
*/
197237
sup(): string;
198238
}
199239
// --------------------
@@ -639,47 +679,87 @@ interface RegExpConstructor {
639679
//
640680
// /**
641681
// * Returns an `<a>` HTML anchor element and sets the name attribute to the text value
682+
// * @deprecated A legacy feature for browser compatibility
642683
// * @param name
643684
// */
644685
// anchor(name: string): string;
645686
//
646-
// /** Returns a `<big>` HTML element */
687+
// /**
688+
// * Returns a `<big>` HTML element
689+
// * @deprecated A legacy feature for browser compatibility
690+
// */
647691
// big(): string;
648692
//
649-
// /** Returns a `<blink>` HTML element */
693+
// /**
694+
// * Returns a `<blink>` HTML element
695+
// * @deprecated A legacy feature for browser compatibility
696+
// */
650697
// blink(): string;
651698
//
652-
// /** Returns a `<b>` HTML element */
699+
// /**
700+
// * Returns a `<b>` HTML element
701+
// * @deprecated A legacy feature for browser compatibility
702+
// */
653703
// bold(): string;
654704
//
655-
// /** Returns a `<tt>` HTML element */
705+
// /**
706+
// * Returns a `<tt>` HTML element
707+
// * @deprecated A legacy feature for browser compatibility
708+
// */
656709
// fixed(): string;
657710
//
658-
// /** Returns a `<font>` HTML element and sets the color attribute value */
711+
// /**
712+
// * Returns a `<font>` HTML element and sets the color attribute value
713+
// * @deprecated A legacy feature for browser compatibility
714+
// */
659715
// fontcolor(color: string): string;
660716
//
661-
// /** Returns a `<font>` HTML element and sets the size attribute value */
717+
// /**
718+
// * Returns a `<font>` HTML element and sets the size attribute value
719+
// * @deprecated A legacy feature for browser compatibility
720+
// */
662721
// fontsize(size: number): string;
663722
//
664-
// /** Returns a `<font>` HTML element and sets the size attribute value */
723+
// /**
724+
// * Returns a `<font>` HTML element and sets the size attribute value
725+
// * @deprecated A legacy feature for browser compatibility
726+
// */
665727
// fontsize(size: string): string;
666728
//
667-
// /** Returns an `<i>` HTML element */
729+
// /**
730+
// * Returns an `<i>` HTML element
731+
// * @deprecated A legacy feature for browser compatibility
732+
// */
668733
// italics(): string;
669734
//
670-
// /** Returns an `<a>` HTML element and sets the href attribute value */
735+
// /**
736+
// * Returns an `<a>` HTML element and sets the href attribute value
737+
// * @deprecated A legacy feature for browser compatibility
738+
// */
671739
// link(url: string): string;
672740
//
673-
// /** Returns a `<small>` HTML element */
741+
// /**
742+
// * Returns a `<small>` HTML element
743+
// * @deprecated A legacy feature for browser compatibility
744+
// */
674745
// small(): string;
675746
//
676-
// /** Returns a `<strike>` HTML element */
747+
// /**
748+
// * Returns a `<strike>` HTML element
749+
// * @deprecated A legacy feature for browser compatibility
750+
// */
677751
// strike(): string;
678752
//
679-
// /** Returns a `<sub>` HTML element */
753+
// /**
754+
// * Returns a `<sub>` HTML element
755+
// * @deprecated A legacy feature for browser compatibility
756+
// */
680757
// sub(): string;
681758
//
682-
// /** Returns a `<sup>` HTML element */
759+
// /**
760+
// * Returns a `<sup>` HTML element
761+
// * @deprecated A legacy feature for browser compatibility
762+
// */
683763
// sup(): string;
684764
// }
685765

generated/lib.es2015.iterable.d.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,15 @@ interface PromiseConstructor {
2323
* @param values An iterable of Promises.
2424
* @returns A new Promise.
2525
*/
26-
all<T>(
27-
values: Iterable<T>
28-
): Promise<(T extends PromiseLike<infer U> ? U : T)[]>;
26+
all<T>(values: Iterable<T>): Promise<Awaited<T>[]>;
2927

3028
/**
3129
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
3230
* or rejected.
3331
* @param values An iterable of Promises.
3432
* @returns A new Promise.
3533
*/
36-
race<T>(values: Iterable<T>): Promise<T extends PromiseLike<infer U> ? U : T>;
34+
race<T>(values: Iterable<T>): Promise<Awaited<T>>;
3735
}
3836
// --------------------
3937
/// <reference lib="es2015.symbol" />
@@ -248,23 +246,15 @@ interface Promise<T> { }
248246
// * @param values An iterable of Promises.
249247
// * @returns A new Promise.
250248
// */
251-
// all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
249+
// all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
252250
//
253251
// /**
254252
// * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
255253
// * or rejected.
256254
// * @param values An iterable of Promises.
257255
// * @returns A new Promise.
258256
// */
259-
// race<T>(values: Iterable<T>): Promise<T extends PromiseLike<infer U> ? U : T>;
260-
//
261-
// /**
262-
// * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
263-
// * or rejected.
264-
// * @param values An iterable of Promises.
265-
// * @returns A new Promise.
266-
// */
267-
// race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
257+
// race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
268258
// }
269259

270260

0 commit comments

Comments
 (0)