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

9 lines
169 B
TypeScript

function f(...x: number[]) {
x.forEach((n, i) => void ('item ' + i + ' = ' + n));
}
function g(x: number[], y: string) { }
var n = g;
n = f;
n([4], 'foo');