普通函数
function foo<T>(x: T): T {
  return x;
}

箭头函数

 

const foo = <T,>(x: T): T => x;
const foo: <T>(x: T) => T = x => x;

 

 

 

 

 

 

 

相关文章:

  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
相关资源
相似解决方案