4. Generic | Utils -Typescripst
Generic = “type as a variable”
Instead of fixing a type (string, number, etc.), you say:
“I’ll decide the type later.”
Think of it like a function parameter, but for types.
//concept of type parameter <T>
// typescript automactically infer the t...
typescript123.hashnode.dev3 min read