How to assign these type predicates' types to their parameters' types?

前端 未结 0 1264
南方客
南方客 2021-02-08 01:18

The followings are what I wanna achieve:

function isString( value: T ) : value is T extends string ? T : string {
         


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