In typescript, how to ensure that all return values are of the same type

后端 未结 0 1948
南方客
南方客 2021-02-07 02:09

I have this code

function dispatch<
  T extends string,
  Out,
>(
  option: Record Out>
): (x: T) => Out {
  return (x) => (option a         


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