diff options
Diffstat (limited to 'cli/dts/lib.es5.d.ts')
-rw-r--r-- | cli/dts/lib.es5.d.ts | 68 |
1 files changed, 40 insertions, 28 deletions
diff --git a/cli/dts/lib.es5.d.ts b/cli/dts/lib.es5.d.ts index 31eb384cd..9e6dfccdf 100644 --- a/cli/dts/lib.es5.d.ts +++ b/cli/dts/lib.es5.d.ts @@ -1219,7 +1219,7 @@ interface ConcatArray<T> { interface Array<T> { /** - * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array. + * Gets or sets the length of the array. This is a number one higher than the highest index in the array. */ length: number; /** @@ -1232,44 +1232,54 @@ interface Array<T> { toLocaleString(): string; /** * Removes the last element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. */ pop(): T | undefined; /** - * Appends new elements to an array, and returns the new length of the array. - * @param items New elements of the Array. + * Appends new elements to the end of an array, and returns the new length of the array. + * @param items New elements to add to the array. */ push(...items: T[]): number; /** * Combines two or more arrays. - * @param items Additional items to add to the end of array1. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. */ concat(...items: ConcatArray<T>[]): T[]; /** * Combines two or more arrays. - * @param items Additional items to add to the end of array1. + * This method returns a new array without modifying any existing arrays. + * @param items Additional arrays and/or items to add to the end of the array. */ concat(...items: (T | ConcatArray<T>)[]): T[]; /** - * Adds all the elements of an array separated by the specified separator string. - * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. + * Adds all the elements of an array into a string, separated by the specified separator string. + * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma. */ join(separator?: string): string; /** - * Reverses the elements in an Array. + * Reverses the elements in an array in place. + * This method mutates the array and returns a reference to the same array. */ reverse(): T[]; /** * Removes the first element from an array and returns it. + * If the array is empty, undefined is returned and the array is not modified. */ shift(): T | undefined; /** - * Returns a section of an array. - * @param start The beginning of the specified portion of the array. - * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. + * Returns a copy of a section of an array. + * For both start and end, a negative index can be used to indicate an offset from the end of the array. + * For example, -2 refers to the second to last element of the array. + * @param start The beginning index of the specified portion of the array. + * If start is undefined, then the slice begins at index 0. + * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. + * If end is undefined, then the slice extends to the end of the array. */ slice(start?: number, end?: number): T[]; /** - * Sorts an array. + * 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 * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. @@ -1282,6 +1292,7 @@ interface Array<T> { * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. * @param start The zero-based location in the array from which to start removing elements. * @param deleteCount The number of elements to remove. + * @returns An array containing the elements that were deleted. */ splice(start: number, deleteCount?: number): T[]; /** @@ -1289,23 +1300,24 @@ interface Array<T> { * @param start The zero-based location in the array from which to start removing elements. * @param deleteCount The number of elements to remove. * @param items Elements to insert into the array in place of the deleted elements. + * @returns An array containing the elements that were deleted. */ splice(start: number, deleteCount: number, ...items: T[]): T[]; /** - * Inserts new elements at the start of an array. - * @param items Elements to insert at the start of the Array. + * Inserts new elements at the start of an array, and returns the new length of the array. + * @param items Elements to insert at the start of the array. */ unshift(...items: T[]): number; /** - * Returns the index of the first occurrence of a value in an array. + * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. */ indexOf(searchElement: T, fromIndex?: number): number; /** - * Returns the index of the last occurrence of a specified value in an array. + * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. * @param searchElement The value to locate in the array. - * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. + * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. */ lastIndexOf(searchElement: T, fromIndex?: number): number; /** @@ -4338,17 +4350,17 @@ declare namespace Intl { }; interface DateTimeFormatOptions { - localeMatcher?: string; - weekday?: string; - era?: string; - year?: string; - month?: string; - day?: string; - hour?: string; - minute?: string; - second?: string; - timeZoneName?: string; - formatMatcher?: string; + 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; } |