Generic

A type or function with a placeholder type, written in angle brackets, that is filled in where it is used.

Think of it as A box with a label that says 'the same kind of thing that went in'.

function firstWhere<T>(list: { T }, predicate: (T) -> boolean): T? works for a list of any type, and the checker knows that a list of parts gives back a part. Generic type aliases look like type Pool<T> = { items: { T } }. Generic type packs, written <A...>, stand for several types in a row.

Official reference: luau.org

Related terms