TypeScript/tests/baselines/reference/optionalParamReferencingOtherParams1.js
2014-07-12 17:30:19 -07:00

12 lines
290 B
TypeScript

//// [optionalParamReferencingOtherParams1.ts]
function strange(x: number, y = x * 1, z = x + y) {
return z;
}
//// [optionalParamReferencingOtherParams1.js]
function strange(x, y, z) {
if (y === void 0) { y = x * 1; }
if (z === void 0) { z = x + y; }
return z;
}