Typescript: map object values while keeping optional keys optional

后端 未结 0 474
南旧
南旧 2020-12-08 13:58

E.g.:

type ObjectOf = { [k: string]: T };

type MapObj> = {
  [K in keyof Obj]: Obj[K] extends string
    ? \'s         


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