Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SincereCSL/Playgrounds
/ log
Function
log
TypeScript/StudyTypeScript/src/generics_01.ts:2–5 ·
view source on GitHub ↗
(value: T)
Source
from the content-addressed store, hash-verified
1
/// 泛型:泛型函数与泛型接口
2
function
log<T>(value: T): T{
3
console.log(value);
4
return
value;
5
}
6
///调用方式
7
// log<string[]>(['a','b'])
8
log([
'a'
,
'b'
])
Callers
1
generics_01.ts
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected