Typescript - How can I conditionally define a type based on another property

后端 未结 0 968
离开以前
离开以前 2021-01-30 18:00

I\'m trying to conditionally set the return type of a function, based on a static value in the same type.

Given the following code, is it possible to have type checking w

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