Skip to content

Commit 588c24d

Browse files
Update to TypeScript 4.3.2.
1 parent fe400e6 commit 588c24d

28 files changed

+80316
-57024
lines changed

tsserver/lib.dom.d.ts

+263-648
Large diffs are not rendered by default.

tsserver/lib.dom.iterable.d.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ interface IDBDatabase {
139139
interface IDBObjectStore {
140140
/**
141141
* Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
142-
*
142+
*
143143
* Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
144144
*/
145145
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
@@ -287,10 +287,6 @@ interface WEBGL_draw_buffers {
287287
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
288288
}
289289

290-
interface WebAuthentication {
291-
makeCredential(accountInformation: Account, cryptoParameters: Iterable<ScopedCredentialParameters>, attestationChallenge: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
292-
}
293-
294290
interface WebGL2RenderingContextBase {
295291
clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
296292
clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;

tsserver/lib.es2015.core.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ interface NumberConstructor {
268268

269269
/**
270270
* Converts A string to an integer.
271-
* @param s A string to convert into a number.
272-
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
271+
* @param string A string to convert into a number.
272+
* @param radix A value between 2 and 36 that specifies the base of the number in `string`.
273273
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
274274
* All other strings are considered decimal.
275275
*/

tsserver/lib.es2015.iterable.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface SymbolConstructor {
2525
* A method that returns the default iterator for an object. Called by the semantics of the
2626
* for-of statement.
2727
*/
28-
readonly iterator: symbol;
28+
readonly iterator: unique symbol;
2929
}
3030

3131
interface IteratorYieldResult<TYield> {

tsserver/lib.es2015.symbol.wellknown.d.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -25,61 +25,61 @@ interface SymbolConstructor {
2525
* A method that determines if a constructor object recognizes an object as one of the
2626
* constructor’s instances. Called by the semantics of the instanceof operator.
2727
*/
28-
readonly hasInstance: symbol;
28+
readonly hasInstance: unique symbol;
2929

3030
/**
3131
* A Boolean value that if true indicates that an object should flatten to its array elements
3232
* by Array.prototype.concat.
3333
*/
34-
readonly isConcatSpreadable: symbol;
34+
readonly isConcatSpreadable: unique symbol;
3535

3636
/**
3737
* A regular expression method that matches the regular expression against a string. Called
3838
* by the String.prototype.match method.
3939
*/
40-
readonly match: symbol;
40+
readonly match: unique symbol;
4141

4242
/**
4343
* A regular expression method that replaces matched substrings of a string. Called by the
4444
* String.prototype.replace method.
4545
*/
46-
readonly replace: symbol;
46+
readonly replace: unique symbol;
4747

4848
/**
4949
* A regular expression method that returns the index within a string that matches the
5050
* regular expression. Called by the String.prototype.search method.
5151
*/
52-
readonly search: symbol;
52+
readonly search: unique symbol;
5353

5454
/**
5555
* A function valued property that is the constructor function that is used to create
5656
* derived objects.
5757
*/
58-
readonly species: symbol;
58+
readonly species: unique symbol;
5959

6060
/**
6161
* A regular expression method that splits a string at the indices that match the regular
6262
* expression. Called by the String.prototype.split method.
6363
*/
64-
readonly split: symbol;
64+
readonly split: unique symbol;
6565

6666
/**
6767
* A method that converts an object to a corresponding primitive value.
6868
* Called by the ToPrimitive abstract operation.
6969
*/
70-
readonly toPrimitive: symbol;
70+
readonly toPrimitive: unique symbol;
7171

7272
/**
7373
* A String value that is used in the creation of the default string description of an object.
7474
* Called by the built-in method Object.prototype.toString.
7575
*/
76-
readonly toStringTag: symbol;
76+
readonly toStringTag: unique symbol;
7777

7878
/**
7979
* An Object whose own property names are property names that are excluded from the 'with'
8080
* environment bindings of the associated objects.
8181
*/
82-
readonly unscopables: symbol;
82+
readonly unscopables: unique symbol;
8383
}
8484

8585
interface Symbol {

tsserver/lib.es2018.asynciterable.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface SymbolConstructor {
2626
* A method that returns the default async iterator for an object. Called by the semantics of
2727
* the for-await-of statement.
2828
*/
29-
readonly asyncIterator: symbol;
29+
readonly asyncIterator: unique symbol;
3030
}
3131

3232
interface AsyncIterator<T, TReturn = any, TNext = undefined> {

tsserver/lib.es2020.bigint.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ interface BigInt {
121121
}
122122

123123
interface BigIntConstructor {
124-
(value?: any): bigint;
124+
(value: bigint | boolean | number | string): bigint;
125125
readonly prototype: BigInt;
126126

127127
/**

tsserver/lib.es2020.intl.d.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ and limitations under the License.
2121
declare namespace Intl {
2222

2323
/**
24-
* [BCP 47 language tag](http://tools.ietf.org/html/rfc5646) definition.
24+
* [Unicode BCP 47 Locale Identifiers](https://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers) definition.
2525
*
2626
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
2727
*
28-
* [Wikipedia](https://en.wikipedia.org/wiki/IETF_language_tag).
2928
*/
30-
type BCP47LanguageTag = string;
29+
type UnicodeBCP47LocaleIdentifier = string;
3130

3231
/**
3332
* Unit to use in the relative time internationalized message.
@@ -98,7 +97,7 @@ declare namespace Intl {
9897
* [Specification](https://tc39.es/ecma402/#table-relativetimeformat-resolvedoptions-properties)
9998
*/
10099
interface ResolvedRelativeTimeFormatOptions {
101-
locale: BCP47LanguageTag;
100+
locale: UnicodeBCP47LocaleIdentifier;
102101
style: RelativeTimeFormatStyle;
103102
numeric: RelativeTimeFormatNumeric;
104103
numberingSystem: string;
@@ -241,7 +240,7 @@ declare namespace Intl {
241240
* [Specification](https://tc39.es/ecma402/#sec-intl-relativetimeformat-constructor).
242241
*/
243242
new(
244-
locales?: BCP47LanguageTag | BCP47LanguageTag[],
243+
locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
245244
options?: RelativeTimeFormatOptions,
246245
): RelativeTimeFormat;
247246

@@ -277,9 +276,9 @@ declare namespace Intl {
277276
* [Specification](https://tc39.es/ecma402/#sec-Intl.RelativeTimeFormat.supportedLocalesOf).
278277
*/
279278
supportedLocalesOf(
280-
locales: BCP47LanguageTag | BCP47LanguageTag[],
279+
locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
281280
options?: RelativeTimeFormatOptions,
282-
): BCP47LanguageTag[];
281+
): UnicodeBCP47LocaleIdentifier[];
283282
};
284283

285284
interface NumberFormatOptions {

tsserver/lib.es2020.symbol.wellknown.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface SymbolConstructor {
2626
* A regular expression method that matches the regular expression against a string. Called
2727
* by the String.prototype.matchAll method.
2828
*/
29-
readonly matchAll: symbol;
29+
readonly matchAll: unique symbol;
3030
}
3131

3232
interface RegExp {

tsserver/lib.es2021.d.ts

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*! *****************************************************************************
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
this file except in compliance with the License. You may obtain a copy of the
5+
License at http://www.apache.org/licenses/LICENSE-2.0
6+
7+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10+
MERCHANTABLITY OR NON-INFRINGEMENT.
11+
12+
See the Apache Version 2.0 License for specific language governing permissions
13+
and limitations under the License.
14+
***************************************************************************** */
15+
16+
17+
18+
/// <reference no-default-lib="true"/>
19+
20+
21+
/// <reference lib="es2020" />
22+
/// <reference lib="es2021.promise" />
23+
/// <reference lib="es2021.string" />
24+
/// <reference lib="es2021.weakref" />

tsserver/lib.es2021.full.d.ts

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*! *****************************************************************************
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
this file except in compliance with the License. You may obtain a copy of the
5+
License at http://www.apache.org/licenses/LICENSE-2.0
6+
7+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10+
MERCHANTABLITY OR NON-INFRINGEMENT.
11+
12+
See the Apache Version 2.0 License for specific language governing permissions
13+
and limitations under the License.
14+
***************************************************************************** */
15+
16+
17+
18+
/// <reference no-default-lib="true"/>
19+
20+
21+
/// <reference lib="es2021" />
22+
/// <reference lib="dom" />
23+
/// <reference lib="webworker.importscripts" />
24+
/// <reference lib="scripthost" />
25+
/// <reference lib="dom.iterable" />

tsserver/lib.es2021.promise.d.ts

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*! *****************************************************************************
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
this file except in compliance with the License. You may obtain a copy of the
5+
License at http://www.apache.org/licenses/LICENSE-2.0
6+
7+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10+
MERCHANTABLITY OR NON-INFRINGEMENT.
11+
12+
See the Apache Version 2.0 License for specific language governing permissions
13+
and limitations under the License.
14+
***************************************************************************** */
15+
16+
17+
18+
/// <reference no-default-lib="true"/>
19+
20+
21+
interface AggregateError extends Error {
22+
errors: any[]
23+
}
24+
25+
interface AggregateErrorConstructor {
26+
new(errors: Iterable<any>, message?: string): AggregateError;
27+
(errors: Iterable<any>, message?: string): AggregateError;
28+
readonly prototype: AggregateError;
29+
}
30+
31+
declare var AggregateError: AggregateErrorConstructor;
32+
33+
/**
34+
* Represents the completion of an asynchronous operation
35+
*/
36+
interface PromiseConstructor {
37+
/**
38+
* The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
39+
* @param values An array or iterable of Promises.
40+
* @returns A new Promise.
41+
*/
42+
any<T>(values: (T | PromiseLike<T>)[] | Iterable<T | PromiseLike<T>>): Promise<T>
43+
}

tsserver/lib.es2021.string.d.ts

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*! *****************************************************************************
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
this file except in compliance with the License. You may obtain a copy of the
5+
License at http://www.apache.org/licenses/LICENSE-2.0
6+
7+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10+
MERCHANTABLITY OR NON-INFRINGEMENT.
11+
12+
See the Apache Version 2.0 License for specific language governing permissions
13+
and limitations under the License.
14+
***************************************************************************** */
15+
16+
17+
18+
/// <reference no-default-lib="true"/>
19+
20+
21+
interface String {
22+
/**
23+
* Replace all instances of a substring in a string, using a regular expression or search string.
24+
* @param searchValue A string to search for.
25+
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
26+
*/
27+
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
28+
29+
/**
30+
* Replace all instances of a substring in a string, using a regular expression or search string.
31+
* @param searchValue A string to search for.
32+
* @param replacer A function that returns the replacement text.
33+
*/
34+
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
35+
}

tsserver/lib.es2021.weakref.d.ts

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*! *****************************************************************************
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
this file except in compliance with the License. You may obtain a copy of the
5+
License at http://www.apache.org/licenses/LICENSE-2.0
6+
7+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10+
MERCHANTABLITY OR NON-INFRINGEMENT.
11+
12+
See the Apache Version 2.0 License for specific language governing permissions
13+
and limitations under the License.
14+
***************************************************************************** */
15+
16+
17+
18+
/// <reference no-default-lib="true"/>
19+
20+
21+
interface WeakRef<T extends object> {
22+
readonly [Symbol.toStringTag]: "WeakRef";
23+
24+
/**
25+
* Returns the WeakRef instance's target object, or undefined if the target object has been
26+
* reclaimed.
27+
*/
28+
deref(): T | undefined;
29+
}
30+
31+
interface WeakRefConstructor {
32+
readonly prototype: WeakRef<any>;
33+
34+
/**
35+
* Creates a WeakRef instance for the given target object.
36+
* @param target The target object for the WeakRef instance.
37+
*/
38+
new<T extends object>(target: T): WeakRef<T>;
39+
}
40+
41+
declare var WeakRef: WeakRefConstructor;
42+
43+
interface FinalizationRegistry<T> {
44+
readonly [Symbol.toStringTag]: "FinalizationRegistry";
45+
46+
/**
47+
* Registers an object with the registry.
48+
* @param target The target object to register.
49+
* @param heldValue The value to pass to the finalizer for this object. This cannot be the
50+
* target object.
51+
* @param unregisterToken The token to pass to the unregister method to unregister the target
52+
* object. If provided (and not undefined), this must be an object. If not provided, the target
53+
* cannot be unregistered.
54+
*/
55+
register(target: object, heldValue: T, unregisterToken?: object): void;
56+
57+
/**
58+
* Unregisters an object from the registry.
59+
* @param unregisterToken The token that was used as the unregisterToken argument when calling
60+
* register to register the target object.
61+
*/
62+
unregister(unregisterToken: object): void;
63+
}
64+
65+
interface FinalizationRegistryConstructor {
66+
readonly prototype: FinalizationRegistry<any>;
67+
68+
/**
69+
* Creates a finalization registry with an associated cleanup callback
70+
* @param cleanupCallback The callback to call after an object in the registry has been reclaimed.
71+
*/
72+
new<T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
73+
}
74+
75+
declare var FinalizationRegistry: FinalizationRegistryConstructor;

0 commit comments

Comments
 (0)