Skip to content

Commit

Permalink
Update TypeScript to 4.7.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser committed May 24, 2022
1 parent a22f8a3 commit 91ce22b
Show file tree
Hide file tree
Showing 41 changed files with 122,153 additions and 105,574 deletions.
123 changes: 72 additions & 51 deletions tsserver/cs/diagnosticMessages.generated.json

Large diffs are not rendered by default.

123 changes: 72 additions & 51 deletions tsserver/de/diagnosticMessages.generated.json

Large diffs are not rendered by default.

109 changes: 65 additions & 44 deletions tsserver/es/diagnosticMessages.generated.json

Large diffs are not rendered by default.

87 changes: 54 additions & 33 deletions tsserver/fr/diagnosticMessages.generated.json

Large diffs are not rendered by default.

127 changes: 74 additions & 53 deletions tsserver/it/diagnosticMessages.generated.json

Large diffs are not rendered by default.

85 changes: 53 additions & 32 deletions tsserver/ja/diagnosticMessages.generated.json

Large diffs are not rendered by default.

125 changes: 73 additions & 52 deletions tsserver/ko/diagnosticMessages.generated.json

Large diffs are not rendered by default.

435 changes: 404 additions & 31 deletions tsserver/lib.dom.d.ts

Large diffs are not rendered by default.

19 changes: 16 additions & 3 deletions tsserver/lib.dom.iterable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ interface DataTransferItemList {
[Symbol.iterator](): IterableIterator<DataTransferItem>;
}

interface EventCounts extends ReadonlyMap<string, number> {
}

interface FileList {
[Symbol.iterator](): IterableIterator<File>;
}
Expand Down Expand Up @@ -130,6 +133,16 @@ interface IDBObjectStore {
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
}

interface MIDIInputMap extends ReadonlyMap<string, MIDIInput> {
}

interface MIDIOutput {
send(data: Iterable<number>, timestamp?: DOMHighResTimeStamp): void;
}

interface MIDIOutputMap extends ReadonlyMap<string, MIDIOutput> {
}

interface MediaKeyStatusMap {
[Symbol.iterator](): IterableIterator<[BufferSource, MediaKeyStatus]>;
entries(): IterableIterator<[BufferSource, MediaKeyStatus]>;
Expand Down Expand Up @@ -233,10 +246,10 @@ interface StyleSheetList {

interface SubtleCrypto {
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
}
Expand Down
6 changes: 3 additions & 3 deletions tsserver/lib.es2015.core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ interface ObjectConstructor {
* @param target The target object to copy to.
* @param source The source object from which to copy properties.
*/
assign<T, U>(target: T, source: U): T & U;
assign<T extends {}, U>(target: T, source: U): T & U;

/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
Expand All @@ -292,7 +292,7 @@ interface ObjectConstructor {
* @param source1 The first source object from which to copy properties.
* @param source2 The second source object from which to copy properties.
*/
assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
assign<T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;

/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
Expand All @@ -302,7 +302,7 @@ interface ObjectConstructor {
* @param source2 The second source object from which to copy properties.
* @param source3 The third source object from which to copy properties.
*/
assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
assign<T extends {}, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;

/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
Expand Down
2 changes: 1 addition & 1 deletion tsserver/lib.es2015.reflect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ declare namespace Reflect {
* @param propertyKey The property name.
* @param attributes Descriptor for the property. It can be for a data property or an accessor property.
*/
function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): boolean;

/**
* Removes a property from an object, equivalent to `delete target[propertyKey]`,
Expand Down
12 changes: 7 additions & 5 deletions tsserver/lib.es2020.bigint.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ and limitations under the License.
/// <reference no-default-lib="true"/>


/// <reference lib="es2020.intl" />

interface BigIntToLocaleStringOptions {
/**
* The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}.
Expand Down Expand Up @@ -112,7 +114,7 @@ interface BigInt {
toString(radix?: number): string;

/** Returns a string representation appropriate to the host environment's current locale. */
toLocaleString(locales?: string, options?: BigIntToLocaleStringOptions): string;
toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string;

/** Returns the primitive value of the specified object. */
valueOf(): bigint;
Expand Down Expand Up @@ -691,31 +693,31 @@ interface DataView {
* Gets the BigInt64 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
* @param littleEndian If false or undefined, a big-endian value should be read.
*/
getBigInt64(byteOffset: number, littleEndian?: boolean): bigint;

/**
* Gets the BigUint64 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
* @param littleEndian If false or undefined, a big-endian value should be read.
*/
getBigUint64(byteOffset: number, littleEndian?: boolean): bigint;

/**
* Stores a BigInt64 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
* @param littleEndian If false or undefined, a big-endian value should be written.
*/
setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void;

/**
* Stores a BigUint64 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
* @param littleEndian If false or undefined, a big-endian value should be written.
*/
setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
}
Expand Down
2 changes: 2 additions & 0 deletions tsserver/lib.es2020.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ and limitations under the License.

/// <reference lib="es2019" />
/// <reference lib="es2020.bigint" />
/// <reference lib="es2020.date" />
/// <reference lib="es2020.number" />
/// <reference lib="es2020.promise" />
/// <reference lib="es2020.sharedmemory" />
/// <reference lib="es2020.string" />
Expand Down
44 changes: 44 additions & 0 deletions tsserver/lib.es2020.date.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*! *****************************************************************************
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.intl" />

interface Date {
/**
* Converts a date and time to a string by using the current or specified locale.
* @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;

/**
* Converts a date to a string by using the current or specified locale.
* @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;

/**
* Converts a time to a string by using the current or specified locale.
* @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
}
51 changes: 43 additions & 8 deletions tsserver/lib.es2020.intl.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ declare namespace Intl {
*/
type BCP47LanguageTag = string;

/**
* The locale(s) to use
*
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
*/
type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined;

/**
* An object with some or all of properties of `options` parameter
* of `Intl.RelativeTimeFormat` constructor.
Expand Down Expand Up @@ -274,6 +281,10 @@ declare namespace Intl {
}

interface Locale extends LocaleOptions {
/** A string containing the language, and the script and region if available. */
baseName: string;
/** The primary language subtag associated with the locale. */
language: string;
/** Gets the most likely values for the language, script, and region of the locale based on existing values. */
maximize(): Locale;
/** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */
Expand All @@ -297,15 +308,39 @@ declare namespace Intl {
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale).
*/
const Locale: {
new (tag?: BCP47LanguageTag, options?: LocaleOptions): Locale;
new (tag: BCP47LanguageTag | Locale, options?: LocaleOptions): Locale;
};

interface DisplayNamesOptions {
type DisplayNamesFallback =
| "code"
| "none";

type DisplayNamesType =
| "language"
| "region"
| "script"
| "calendar"
| "dateTimeField"
| "currency";

type DisplayNamesLanguageDisplay =
| "dialect"
| "standard";

interface DisplayNamesOptions {
localeMatcher?: RelativeTimeFormatLocaleMatcher;
style?: RelativeTimeFormatStyle;
type: DisplayNamesType;
languageDisplay?: DisplayNamesLanguageDisplay;
fallback?: DisplayNamesFallback;
}

interface ResolvedDisplayNamesOptions {
locale: UnicodeBCP47LocaleIdentifier;
localeMatcher: RelativeTimeFormatLocaleMatcher;
style: RelativeTimeFormatStyle;
type: "language" | "region" | "script" | "currency";
fallback: "code" | "none";
type: DisplayNamesType;
fallback: DisplayNamesFallback;
languageDisplay?: DisplayNamesLanguageDisplay;
}

interface DisplayNames {
Expand All @@ -331,7 +366,7 @@ declare namespace Intl {
*
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions).
*/
resolvedOptions(): DisplayNamesOptions;
resolvedOptions(): ResolvedDisplayNamesOptions;
}

/**
Expand All @@ -352,7 +387,7 @@ declare namespace Intl {
*
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames).
*/
new(locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: Partial<DisplayNamesOptions>): DisplayNames;
new(locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames;

/**
* Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale.
Expand All @@ -367,7 +402,7 @@ declare namespace Intl {
*
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf).
*/
supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: {localeMatcher: RelativeTimeFormatLocaleMatcher}): BCP47LanguageTag[];
supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher }): BCP47LanguageTag[];
};

}
30 changes: 30 additions & 0 deletions tsserver/lib.es2020.number.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*! *****************************************************************************
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.intl" />

interface Number {
/**
* Converts a number to a string by using the current or specified locale.
* @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
}
1 change: 1 addition & 0 deletions tsserver/lib.es2021.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ and limitations under the License.
/// <reference lib="es2021.promise" />
/// <reference lib="es2021.string" />
/// <reference lib="es2021.weakref" />
/// <reference lib="es2021.intl" />

0 comments on commit 91ce22b

Please sign in to comment.