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 useful fact does <T>(value: T) => T express that (value: any) => any does not?
from Generics
TypeScript 6
beginner
1 min
What useful fact does <T>(value: T) => T express that (value: any) => any does not?
The result preserves the input type selected for this call.
The function validates value at runtime.
The function accepts only objects.
TypeScript emits one JavaScript function per type.
Check
Ask AI about this kata
Report an error
previous kata
What does this program print?
Predict the output
next kata
Review generated entity index
Review AI code
A new version is available
Reload