Use generics if:
- You truly don’t know what type is passed into something
- You want to be open for a set of different data types - e.g. when implementing general data structures like queues
Adding a generic to a function:
function someFunction<T>(paramOne: T) : T {}
Adding a generic to a class:
class Queue<T> { }