Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SincereCSL/Playgrounds
/ getValues2
Function
getValues2
TypeScript/StudyTypeScript/src/advanced_02.ts:25–27 ·
view source on GitHub ↗
(obj: T, keys: k[])
Source
from the content-addressed store, hash-verified
23
24
// T extends U
25
function
getValues2<T, k extends keyof T>(obj: T, keys: k[]): T[k][]{
26
return
keys.map(key => obj[key])
27
}
28
console.log(getValues2(tmpObj, [
'a'
,
'b'
]))
Callers
1
advanced_02.ts
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected