Typescript overload for 2 parameters with 1 optionnal and 3 different return types

后端 未结 0 1870
误落风尘
误落风尘 2020-12-07 00:08

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

<         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题