Can't figure out how conditional types work

前端 未结 0 974
生来不讨喜
生来不讨喜 2021-01-16 14:29

I\'ve got such a piece of code:

const f = (b: T): T extends string ? number : string => typeof b === "string" ?          


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