TypeScript Associate — Medium
Key points
- 'T extends string' restricts the type T to be assignable to string
- Only values that are strings or can be converted to strings are allowed
- This constraint limits the types that can be passed to the generic
Ready to go further?
Related questions
