DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
TypeScript Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
medium
TypeScript
A function is written as `function firstElement(arr: any[]): any`. What type information does a caller lose compared to a properly generic version?
A
None — any and generics behave identically for callers
B
The caller gets `any` back regardless of what was passed in, losing the actual input-to-output type relationship a generic <T>(arr: T[]): T would have preserved
C
any versions run faster
D
any versions provide MORE type safety
Check Answer