Merge pull request #10374 from Microsoft/readonly-array-type-argument-assignability

Improve ReadonlyArray<T>.concat to match Array<T>
This commit is contained in:
Nathan Shively-Sanders
2016-08-17 08:28:38 -07:00
committed by GitHub
4 changed files with 124 additions and 1 deletions

7
src/lib/es5.d.ts vendored
View File

@@ -1006,7 +1006,12 @@ interface ReadonlyArray<T> {
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
*/
concat(...items: T[]): T[];
concat(...items: T[][]): T[];
/**
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
*/
concat(...items: (T | 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.