7 lines
243 B
Plaintext
7 lines
243 B
Plaintext
|
==== tests/cases/compiler/nonArrayRestArgs.ts (1 errors) ====
|
||
|
function foo(...rest: number) { // error
|
||
|
~~~~~~~~~~~~~~~
|
||
|
!!! A rest parameter must be of an array type.
|
||
|
var x: string = rest[0];
|
||
|
return x;
|
||
|
}
|