How to let typescript return correct type based on parameters

后端 未结 0 1419
别那么骄傲
别那么骄傲 2021-02-02 11:43

i\'m having a code example like this

interface BaseQuestionType {
  label?: string
}
export type RadioQuestionType = BaseQuestionType & {
  radio: boolean
}
e         


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