Skip to content

Commit

Permalink
Update to TypeScript 4.3.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser committed May 26, 2021
1 parent fe400e6 commit 588c24d
Show file tree
Hide file tree
Showing 28 changed files with 80,316 additions and 57,024 deletions.
911 changes: 263 additions & 648 deletions tsserver/lib.dom.d.ts

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions tsserver/lib.dom.iterable.d.ts
Expand Up @@ -139,7 +139,7 @@ interface IDBDatabase {
interface IDBObjectStore {
/**
* 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.
*
*
* Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
*/
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
Expand Down Expand Up @@ -287,10 +287,6 @@ interface WEBGL_draw_buffers {
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
}

interface WebAuthentication {
makeCredential(accountInformation: Account, cryptoParameters: Iterable<ScopedCredentialParameters>, attestationChallenge: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
}

interface WebGL2RenderingContextBase {
clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;
Expand Down
4 changes: 2 additions & 2 deletions tsserver/lib.es2015.core.d.ts
Expand Up @@ -268,8 +268,8 @@ interface NumberConstructor {

/**
* Converts A string to an integer.
* @param s A string to convert into a number.
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
* @param string A string to convert into a number.
* @param radix A value between 2 and 36 that specifies the base of the number in `string`.
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
* All other strings are considered decimal.
*/
Expand Down
2 changes: 1 addition & 1 deletion tsserver/lib.es2015.iterable.d.ts
Expand Up @@ -25,7 +25,7 @@ interface SymbolConstructor {
* A method that returns the default iterator for an object. Called by the semantics of the
* for-of statement.
*/
readonly iterator: symbol;
readonly iterator: unique symbol;
}

interface IteratorYieldResult<TYield> {
Expand Down
20 changes: 10 additions & 10 deletions tsserver/lib.es2015.symbol.wellknown.d.ts
Expand Up @@ -25,61 +25,61 @@ interface SymbolConstructor {
* A method that determines if a constructor object recognizes an object as one of the
* constructor’s instances. Called by the semantics of the instanceof operator.
*/
readonly hasInstance: symbol;
readonly hasInstance: unique symbol;

/**
* A Boolean value that if true indicates that an object should flatten to its array elements
* by Array.prototype.concat.
*/
readonly isConcatSpreadable: symbol;
readonly isConcatSpreadable: unique symbol;

/**
* A regular expression method that matches the regular expression against a string. Called
* by the String.prototype.match method.
*/
readonly match: symbol;
readonly match: unique symbol;

/**
* A regular expression method that replaces matched substrings of a string. Called by the
* String.prototype.replace method.
*/
readonly replace: symbol;
readonly replace: unique symbol;

/**
* A regular expression method that returns the index within a string that matches the
* regular expression. Called by the String.prototype.search method.
*/
readonly search: symbol;
readonly search: unique symbol;

/**
* A function valued property that is the constructor function that is used to create
* derived objects.
*/
readonly species: symbol;
readonly species: unique symbol;

/**
* A regular expression method that splits a string at the indices that match the regular
* expression. Called by the String.prototype.split method.
*/
readonly split: symbol;
readonly split: unique symbol;

/**
* A method that converts an object to a corresponding primitive value.
* Called by the ToPrimitive abstract operation.
*/
readonly toPrimitive: symbol;
readonly toPrimitive: unique symbol;

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

/**
* An Object whose own property names are property names that are excluded from the 'with'
* environment bindings of the associated objects.
*/
readonly unscopables: symbol;
readonly unscopables: unique symbol;
}

interface Symbol {
Expand Down
2 changes: 1 addition & 1 deletion tsserver/lib.es2018.asynciterable.d.ts
Expand Up @@ -26,7 +26,7 @@ interface SymbolConstructor {
* A method that returns the default async iterator for an object. Called by the semantics of
* the for-await-of statement.
*/
readonly asyncIterator: symbol;
readonly asyncIterator: unique symbol;
}

interface AsyncIterator<T, TReturn = any, TNext = undefined> {
Expand Down
2 changes: 1 addition & 1 deletion tsserver/lib.es2020.bigint.d.ts
Expand Up @@ -121,7 +121,7 @@ interface BigInt {
}

interface BigIntConstructor {
(value?: any): bigint;
(value: bigint | boolean | number | string): bigint;
readonly prototype: BigInt;

/**
Expand Down
13 changes: 6 additions & 7 deletions tsserver/lib.es2020.intl.d.ts
Expand Up @@ -21,13 +21,12 @@ and limitations under the License.
declare namespace Intl {

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

/**
* Unit to use in the relative time internationalized message.
Expand Down Expand Up @@ -98,7 +97,7 @@ declare namespace Intl {
* [Specification](https://tc39.es/ecma402/#table-relativetimeformat-resolvedoptions-properties)
*/
interface ResolvedRelativeTimeFormatOptions {
locale: BCP47LanguageTag;
locale: UnicodeBCP47LocaleIdentifier;
style: RelativeTimeFormatStyle;
numeric: RelativeTimeFormatNumeric;
numberingSystem: string;
Expand Down Expand Up @@ -241,7 +240,7 @@ declare namespace Intl {
* [Specification](https://tc39.es/ecma402/#sec-intl-relativetimeformat-constructor).
*/
new(
locales?: BCP47LanguageTag | BCP47LanguageTag[],
locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
options?: RelativeTimeFormatOptions,
): RelativeTimeFormat;

Expand Down Expand Up @@ -277,9 +276,9 @@ declare namespace Intl {
* [Specification](https://tc39.es/ecma402/#sec-Intl.RelativeTimeFormat.supportedLocalesOf).
*/
supportedLocalesOf(
locales: BCP47LanguageTag | BCP47LanguageTag[],
locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
options?: RelativeTimeFormatOptions,
): BCP47LanguageTag[];
): UnicodeBCP47LocaleIdentifier[];
};

interface NumberFormatOptions {
Expand Down
2 changes: 1 addition & 1 deletion tsserver/lib.es2020.symbol.wellknown.d.ts
Expand Up @@ -26,7 +26,7 @@ interface SymbolConstructor {
* A regular expression method that matches the regular expression against a string. Called
* by the String.prototype.matchAll method.
*/
readonly matchAll: symbol;
readonly matchAll: unique symbol;
}

interface RegExp {
Expand Down
24 changes: 24 additions & 0 deletions tsserver/lib.es2021.d.ts
@@ -0,0 +1,24 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */



/// <reference no-default-lib="true"/>


/// <reference lib="es2020" />
/// <reference lib="es2021.promise" />
/// <reference lib="es2021.string" />
/// <reference lib="es2021.weakref" />
25 changes: 25 additions & 0 deletions tsserver/lib.es2021.full.d.ts
@@ -0,0 +1,25 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */



/// <reference no-default-lib="true"/>


/// <reference lib="es2021" />
/// <reference lib="dom" />
/// <reference lib="webworker.importscripts" />
/// <reference lib="scripthost" />
/// <reference lib="dom.iterable" />
43 changes: 43 additions & 0 deletions tsserver/lib.es2021.promise.d.ts
@@ -0,0 +1,43 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */



/// <reference no-default-lib="true"/>


interface AggregateError extends Error {
errors: any[]
}

interface AggregateErrorConstructor {
new(errors: Iterable<any>, message?: string): AggregateError;
(errors: Iterable<any>, message?: string): AggregateError;
readonly prototype: AggregateError;
}

declare var AggregateError: AggregateErrorConstructor;

/**
* Represents the completion of an asynchronous operation
*/
interface PromiseConstructor {
/**
* 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.
* @param values An array or iterable of Promises.
* @returns A new Promise.
*/
any<T>(values: (T | PromiseLike<T>)[] | Iterable<T | PromiseLike<T>>): Promise<T>
}
35 changes: 35 additions & 0 deletions tsserver/lib.es2021.string.d.ts
@@ -0,0 +1,35 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */



/// <reference no-default-lib="true"/>


interface String {
/**
* Replace all instances of a substring in a string, using a regular expression or search string.
* @param searchValue A string to search for.
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
*/
replaceAll(searchValue: string | RegExp, replaceValue: string): string;

/**
* Replace all instances of a substring in a string, using a regular expression or search string.
* @param searchValue A string to search for.
* @param replacer A function that returns the replacement text.
*/
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
}
75 changes: 75 additions & 0 deletions tsserver/lib.es2021.weakref.d.ts
@@ -0,0 +1,75 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */



/// <reference no-default-lib="true"/>


interface WeakRef<T extends object> {
readonly [Symbol.toStringTag]: "WeakRef";

/**
* Returns the WeakRef instance's target object, or undefined if the target object has been
* reclaimed.
*/
deref(): T | undefined;
}

interface WeakRefConstructor {
readonly prototype: WeakRef<any>;

/**
* Creates a WeakRef instance for the given target object.
* @param target The target object for the WeakRef instance.
*/
new<T extends object>(target: T): WeakRef<T>;
}

declare var WeakRef: WeakRefConstructor;

interface FinalizationRegistry<T> {
readonly [Symbol.toStringTag]: "FinalizationRegistry";

/**
* Registers an object with the registry.
* @param target The target object to register.
* @param heldValue The value to pass to the finalizer for this object. This cannot be the
* target object.
* @param unregisterToken The token to pass to the unregister method to unregister the target
* object. If provided (and not undefined), this must be an object. If not provided, the target
* cannot be unregistered.
*/
register(target: object, heldValue: T, unregisterToken?: object): void;

/**
* Unregisters an object from the registry.
* @param unregisterToken The token that was used as the unregisterToken argument when calling
* register to register the target object.
*/
unregister(unregisterToken: object): void;
}

interface FinalizationRegistryConstructor {
readonly prototype: FinalizationRegistry<any>;

/**
* Creates a finalization registry with an associated cleanup callback
* @param cleanupCallback The callback to call after an object in the registry has been reclaimed.
*/
new<T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
}

declare var FinalizationRegistry: FinalizationRegistryConstructor;

0 comments on commit 588c24d

Please sign in to comment.