I\'m struggling typing my return type for 2 parameters with one optional that can have an union if both are passed into the function, here is a simplified snippet
<