Typescript return type depending on object parameter

后端 未结 0 347
臣服心动
臣服心动 2020-12-24 11:06

How can I properly infer the return type based on a function that has one parameter that is a union of two types?

I\'ve tried the following with conditional types, bu

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