问题:
The typescript handbook currently has nothing on arrow functions.打字稿手册目前没有关于箭头函数的内容。 Normal functions can be generically typed with this syntax: example:可以使用以下语法对普通函数进行一般类型化:例如:
function identity<T>(arg: T): T {
return arg;
}
What is the syntax for arrow functions?箭头函数的语法是什么?
解决方案:
参考一: https://stackoom.com/question/2BYsk参考二: What is the syntax for Typescript arrow functions with generics?