Apparently in typescript there\'s a difference between optional parameter and parameter of union type with undefined
function test(s: string|undefined) {} functi