9 lines
201 B
JavaScript
9 lines
201 B
JavaScript
|
//// [defaultValueInFunctionOverload1.ts]
|
||
|
function foo(x: string = '');
|
||
|
function foo(x = '') { }
|
||
|
|
||
|
//// [defaultValueInFunctionOverload1.js]
|
||
|
function foo(x) {
|
||
|
if (x === void 0) { x = ''; }
|
||
|
}
|