Understanding Contravariance in TypeScript Functions and Parameters