2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/nonArrayRestArgs.ts(1,14): error TS2370: A rest parameter must be of an array type.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/nonArrayRestArgs.ts (1 errors) ====
|
|
|
|
function foo(...rest: number) { // error
|
|
|
|
~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2370: A rest parameter must be of an array type.
|
2014-07-13 01:04:16 +02:00
|
|
|
var x: string = rest[0];
|
|
|
|
return x;
|
|
|
|
}
|