Type inference is a feature in TypeScript that automatically determines the type of a variable, function return type, or expression without the need for explicit type annotations.
TypeScript uses the context and the values assigned to infer the most appropriate type.