TypeScript/tests/baselines/reference/restParamsWithNonRestParams.js
2015-02-06 18:45:09 -08:00

16 lines
415 B
JavaScript

//// [restParamsWithNonRestParams.ts]
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
//// [restParamsWithNonRestParams.js]
function foo() { }
foo(); // ok
function foo2(a) { }
foo2(); // should be an error
function foo3(a) { }
foo3(); // error but shouldn't be