summaryrefslogtreecommitdiff
path: root/cli/dts/lib.es5.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/dts/lib.es5.d.ts')
-rw-r--r--cli/dts/lib.es5.d.ts146
1 files changed, 103 insertions, 43 deletions
diff --git a/cli/dts/lib.es5.d.ts b/cli/dts/lib.es5.d.ts
index 2a70d1d88..1f8508ab4 100644
--- a/cli/dts/lib.es5.d.ts
+++ b/cli/dts/lib.es5.d.ts
@@ -84,12 +84,14 @@ declare function encodeURIComponent(uriComponent: string | number | boolean): st
/**
* Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
+ * @deprecated A legacy feature for browser compatibility
* @param string A string value
*/
declare function escape(string: string): string;
/**
* Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
+ * @deprecated A legacy feature for browser compatibility
* @param string A string value
*/
declare function unescape(string: string): string;
@@ -214,13 +216,13 @@ interface ObjectConstructor {
/**
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
+ * @param a Object on which to lock the attributes.
*/
freeze<T>(a: T[]): readonly T[];
/**
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
+ * @param f Object on which to lock the attributes.
*/
freeze<T extends Function>(f: T): T;
@@ -503,6 +505,7 @@ interface String {
// IE extensions
/**
* Gets a substring beginning at the specified location and having the specified length.
+ * @deprecated A legacy feature for browser compatibility
* @param from The starting position of the desired substring. The index of the first character in the string is zero.
* @param length The number of characters to include in the returned substring.
*/
@@ -614,6 +617,23 @@ interface TemplateStringsArray extends ReadonlyArray<string> {
interface ImportMeta {
}
+/**
+ * The type for the optional second argument to `import()`.
+ *
+ * If your host environment supports additional options, this type may be
+ * augmented via interface merging.
+ */
+interface ImportCallOptions {
+ assert?: ImportAssertions;
+}
+
+/**
+ * The type for the `assert` property of the optional second argument to `import()`.
+ */
+interface ImportAssertions {
+ [key: string]: string;
+}
+
interface Math {
/** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
readonly E: number;
@@ -944,7 +964,8 @@ interface RegExp {
lastIndex: number;
// Non-standard extensions
- compile(): this;
+ /** @deprecated A legacy feature for browser compatibility */
+ compile(pattern: string, flags?: string): this;
}
interface RegExpConstructor {
@@ -955,16 +976,44 @@ interface RegExpConstructor {
readonly prototype: RegExp;
// Non-standard extensions
+ /** @deprecated A legacy feature for browser compatibility */
$1: string;
+ /** @deprecated A legacy feature for browser compatibility */
$2: string;
+ /** @deprecated A legacy feature for browser compatibility */
$3: string;
+ /** @deprecated A legacy feature for browser compatibility */
$4: string;
+ /** @deprecated A legacy feature for browser compatibility */
$5: string;
+ /** @deprecated A legacy feature for browser compatibility */
$6: string;
+ /** @deprecated A legacy feature for browser compatibility */
$7: string;
+ /** @deprecated A legacy feature for browser compatibility */
$8: string;
+ /** @deprecated A legacy feature for browser compatibility */
$9: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ input: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ $_: string;
+ /** @deprecated A legacy feature for browser compatibility */
lastMatch: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ "$&": string;
+ /** @deprecated A legacy feature for browser compatibility */
+ lastParen: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ "$+": string;
+ /** @deprecated A legacy feature for browser compatibility */
+ leftContext: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ "$`": string;
+ /** @deprecated A legacy feature for browser compatibility */
+ rightContext: string;
+ /** @deprecated A legacy feature for browser compatibility */
+ "$'": string;
}
declare var RegExp: RegExpConstructor;
@@ -1281,7 +1330,7 @@ interface Array<T> {
* Sorts an array in place.
* This method mutates the array and returns a reference to the same array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
- * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
* value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
* ```ts
* [11,2,22,1].sort((a, b) => a - b)
@@ -1460,6 +1509,17 @@ interface Promise<T> {
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
}
+/**
+ * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`.
+ */
+type Awaited<T> =
+ T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
+ T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
+ F extends ((value: infer V) => any) ? // if the argument to `then` is callable, extracts the argument
+ Awaited<V> : // recursively unwrap the value
+ never : // the argument to `then` was not callable
+ T; // non-object or non-thenable
+
interface ArrayLike<T> {
readonly length: number;
readonly [n: number]: T;
@@ -1966,7 +2026,7 @@ interface Int8Array {
* Sorts an array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if first argument is less than second argument, zero if they're equal and a positive
- * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * value otherwise. If omitted, the elements are sorted in ascending order.
* ```ts
* [11,2,22,1].sort((a, b) => a - b)
* ```
@@ -2248,7 +2308,7 @@ interface Uint8Array {
* Sorts an array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if first argument is less than second argument, zero if they're equal and a positive
- * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * value otherwise. If omitted, the elements are sorted in ascending order.
* ```ts
* [11,2,22,1].sort((a, b) => a - b)
* ```
@@ -2530,7 +2590,7 @@ interface Uint8ClampedArray {
* Sorts an array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if first argument is less than second argument, zero if they're equal and a positive
- * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * value otherwise. If omitted, the elements are sorted in ascending order.
* ```ts
* [11,2,22,1].sort((a, b) => a - b)
* ```
@@ -2810,7 +2870,7 @@ interface Int16Array {
* Sorts an array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if first argument is less than second argument, zero if they're equal and a positive
- * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * value otherwise. If omitted, the elements are sorted in ascending order.
* ```ts
* [11,2,22,1].sort((a, b) => a - b)
* ```
@@ -3093,7 +3153,7 @@ interface Uint16Array {
* Sorts an array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if first argument is less than second argument, zero if they're equal and a positive
- * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * value otherwise. If omitted, the elements are sorted in ascending order.
* ```ts
* [11,2,22,1].sort((a, b) => a - b)
* ```
@@ -3375,7 +3435,7 @@ interface Int32Array {
* Sorts an array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if first argument is less than second argument, zero if they're equal and a positive
- * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * value otherwise. If omitted, the elements are sorted in ascending order.
* ```ts
* [11,2,22,1].sort((a, b) => a - b)
* ```
@@ -3656,7 +3716,7 @@ interface Uint32Array {
* Sorts an array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if first argument is less than second argument, zero if they're equal and a positive
- * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * value otherwise. If omitted, the elements are sorted in ascending order.
* ```ts
* [11,2,22,1].sort((a, b) => a - b)
* ```
@@ -3938,7 +3998,7 @@ interface Float32Array {
* Sorts an array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if first argument is less than second argument, zero if they're equal and a positive
- * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * value otherwise. If omitted, the elements are sorted in ascending order.
* ```ts
* [11,2,22,1].sort((a, b) => a - b)
* ```
@@ -4221,7 +4281,7 @@ interface Float64Array {
* Sorts an array.
* @param compareFn Function used to determine the order of the elements. It is expected to return
* a negative value if first argument is less than second argument, zero if they're equal and a positive
- * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * value otherwise. If omitted, the elements are sorted in ascending order.
* ```ts
* [11,2,22,1].sort((a, b) => a - b)
* ```
@@ -4283,12 +4343,12 @@ declare var Float64Array: Float64ArrayConstructor;
declare namespace Intl {
interface CollatorOptions {
- usage?: string;
- localeMatcher?: string;
- numeric?: boolean;
- caseFirst?: string;
- sensitivity?: string;
- ignorePunctuation?: boolean;
+ usage?: string | undefined;
+ localeMatcher?: string | undefined;
+ numeric?: boolean | undefined;
+ caseFirst?: string | undefined;
+ sensitivity?: string | undefined;
+ ignorePunctuation?: boolean | undefined;
}
interface ResolvedCollatorOptions {
@@ -4312,17 +4372,17 @@ declare namespace Intl {
};
interface NumberFormatOptions {
- localeMatcher?: string;
- style?: string;
- currency?: string;
- currencyDisplay?: string;
- currencySign?: string;
- useGrouping?: boolean;
- minimumIntegerDigits?: number;
- minimumFractionDigits?: number;
- maximumFractionDigits?: number;
- minimumSignificantDigits?: number;
- maximumSignificantDigits?: number;
+ localeMatcher?: string | undefined;
+ style?: string | undefined;
+ currency?: string | undefined;
+ currencyDisplay?: string | undefined;
+ currencySign?: string | undefined;
+ useGrouping?: boolean | undefined;
+ minimumIntegerDigits?: number | undefined;
+ minimumFractionDigits?: number | undefined;
+ maximumFractionDigits?: number | undefined;
+ minimumSignificantDigits?: number | undefined;
+ maximumSignificantDigits?: number | undefined;
}
interface ResolvedNumberFormatOptions {
@@ -4350,19 +4410,19 @@ declare namespace Intl {
};
interface DateTimeFormatOptions {
- localeMatcher?: "best fit" | "lookup";
- weekday?: "long" | "short" | "narrow";
- era?: "long" | "short" | "narrow";
- year?: "numeric" | "2-digit";
- month?: "numeric" | "2-digit" | "long" | "short" | "narrow";
- day?: "numeric" | "2-digit";
- hour?: "numeric" | "2-digit";
- minute?: "numeric" | "2-digit";
- second?: "numeric" | "2-digit";
- timeZoneName?: "long" | "short";
- formatMatcher?: "best fit" | "basic";
- hour12?: boolean;
- timeZone?: string;
+ localeMatcher?: "best fit" | "lookup" | undefined;
+ weekday?: "long" | "short" | "narrow" | undefined;
+ era?: "long" | "short" | "narrow" | undefined;
+ year?: "numeric" | "2-digit" | undefined;
+ month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined;
+ day?: "numeric" | "2-digit" | undefined;
+ hour?: "numeric" | "2-digit" | undefined;
+ minute?: "numeric" | "2-digit" | undefined;
+ second?: "numeric" | "2-digit" | undefined;
+ timeZoneName?: "long" | "short" | undefined;
+ formatMatcher?: "best fit" | "basic" | undefined;
+ hour12?: boolean | undefined;
+ timeZone?: string | undefined;
}
interface ResolvedDateTimeFormatOptions {