Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
TypeScript
/
Generics
What does T extends { id: string } guarantee inside a generic function?
from Generics
TypeScript 6
intermediate
1 min
What does T extends { id: string } guarantee inside a generic function?
Typed arguments have a string id, so the body may read that member.
Every JSON value passed at runtime is validated automatically.
Only instances of one named class are accepted.
The id must be non-empty and authorized.
Check
Ask AI about this kata
Report an error
next kata
What does this program print?
Predict the output
A new version is available
Reload