Is there ArgumentsType like ReturnType in Typescript?

前端 未结 6 724
一个人的身影
一个人的身影 2020-11-30 12:34

ReturnType extracts return type of a function.

Is there a way to define ArgumentsType that extracts parameter types of a

6条回答
  •  一个人的身影
    2020-11-30 12:47

    I created a collection of common helper types like this: https://github.com/joonhocho/tsdef

    Here's you can find many helper patterns for typescript. you can install via npm or yarn as well. npm i -D tsdef

提交回复
热议问题