TypeScript/tests/cases/compiler/restParamsWithNonRestParams.ts
2014-07-12 17:30:19 -07:00

6 lines
194 B
TypeScript

function foo(...b:number[]){}
foo(); // ok
function foo2(a:string, ...b:number[]){}
foo2(); // should be an error
function foo3(a?:string, ...b:number[]){}
foo3(); // error but shouldn't be