TypeScript/tests/cases/compiler/restParamsWithNonRestParams.ts

6 lines
194 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
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