Generics let you write reusable code parameterized by a type — a "type variable" filled in when the code is used. They give you reuse without losing type safety (the alternative, any, loses it).
ts
(): { arr[]; }
first<T>(: T[]): T { arr[]; }
n = ([, , ]);
s = ([, ]);
