TypescriptのGenerics functionの定義
October 30, 2019
113
関数
function test<T>(x: T) {
return x
}
アロー関数
const test = <T>(x: T): T => x
function test<T>(x: T) {
return x
}
const test = <T>(x: T): T => x
- 本文作者:Wenhua Chen
- 本文链接:https://wenhuachen.com/2019/10/30/Typescript%E3%81%AEGenerics-function%E3%81%AE%E5%AE%9A%E7%BE%A9/index.html
- 版权声明:本博客所有文章均采用 BY-NC-SA 许可协议,转载请注明出处!