Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SincereCSL/Playgrounds
/ log3
Function
log3
TypeScript/StudyTypeScript/src/generics_02.ts:25–28 ·
view source on GitHub ↗
(value: T)
Source
from the content-addressed store, hash-verified
23
length: number
24
}
25
function
log3<T extends Length>(value: T): T{
26
console.log(value,value.length)
27
return
value
28
}
29
log3([1,2])
30
log3(
'str'
)
31
log3({length: 1})
Callers
1
generics_02.ts
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected