Generic types are like functions for type declarations the let you pass some arguments (other types) later. This is a (part of) simple linked list implementation:
1
type ListNode = {
2
value: any;
3
next: ListNode|null;
4
}
5
6
function add(head: ListNode, value: any): ListNode {