Namchee @namchee.dev · Dec 17

Day 17. We can strongly-type the composition and utilities using generics. To avoid type narrowing for string utilities, we can recast it using string utility types.

0 likes 1 replies

?

Replies

Namchee · Dec 18

Day 18. We are dealing with unprovided generics. The trick is to assert whether the generic is provided or not. If it's not provided, access the array element. Otherwise, return the generic as-is.