TypeScript: not sure if I typed this promise-returning function correctly

后端 未结 0 1353
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-13 08:40

I have a util function that fetches a list of resources at an endpoint. I wanted to properly type this function.

type item = {
  id: number
  name: string
}

         


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