TypeScript supports multiple ways to express collections of values. Arrays can be written using either bracket syntax, such as let numbers: number[] = [1, 2, 3];, or the generic Array<number> notation. Both forms accept a single uniform type, but heterogeneous data is better expressed with tuples, which are fixed-length arrays whose positions each have a specific type. An example is let pair: [string, number] = ["age", 30];, where the tuple enforces both length and the ordering of types.
Enums provide named constants that improve readability over magic numbers or scattered strings. By default, a numeric enum such as enum Color { Red, Green, Blue } assigns zero-based numeric values, but string-based enums are equally supported. Enums group related values into a single, easy-to-reference namespace and let integrated development environments offer autocomplete suggestions.
Functions are typed by annotating parameters and return values, as in function add(a: number, b: number): number { return a + b; }, and arrow functions follow the same conventions. Parameters can be made optional with ?, in which case they default to undefined when omitted, while default parameters supply a fallback value that activates when no argument is passed. Rest parameters use the spread syntax with an array type, like function sum(...numbers: number[]): number, collecting any remaining positional arguments into a single array for the body to work with.