TypeScript/tests/baselines/reference/optionalParamReferencingOtherParams1.js

12 lines
290 B
TypeScript
Raw Normal View History

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