Skip to content

Commit 714402a

Browse files
author
Andy Hanson
committed
Array arguments to concat should be ReadonlyArrays
1 parent 80a7ed9 commit 714402a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/es5.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -980,12 +980,12 @@ interface ReadonlyArray<T> {
980980
* Combines two or more arrays.
981981
* @param items Additional items to add to the end of array1.
982982
*/
983-
concat(...items: T[][]): T[];
983+
concat(...items: ReadonlyArray<T>[]): T[];
984984
/**
985985
* Combines two or more arrays.
986986
* @param items Additional items to add to the end of array1.
987987
*/
988-
concat(...items: (T | T[])[]): T[];
988+
concat(...items: (T | ReadonlyArray<T>)[]): T[];
989989
/**
990990
* Adds all the elements of an array separated by the specified separator string.
991991
* @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.
@@ -1099,12 +1099,12 @@ interface Array<T> {
10991099
* Combines two or more arrays.
11001100
* @param items Additional items to add to the end of array1.
11011101
*/
1102-
concat(...items: T[][]): T[];
1102+
concat(...items: ReadonlyArray<T>[]): T[];
11031103
/**
11041104
* Combines two or more arrays.
11051105
* @param items Additional items to add to the end of array1.
11061106
*/
1107-
concat(...items: (T | T[])[]): T[];
1107+
concat(...items: (T | ReadonlyArray<T>)[]): T[];
11081108
/**
11091109
* Adds all the elements of an array separated by the specified separator string.
11101110
* @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.

0 commit comments

Comments
 (0)