Contextual typing is when TypeScript infers a type from the context/location where an expression appears — rather than from the expression itself. TypeScript looks at where something is used to figure out what type it should be.