What does `strictFunctionTypes` enforce in TypeScript?

TypeScript Professional Hard

TypeScript Professional — Hard

What does `strictFunctionTypes` enforce in TypeScript?

Key points

  • Contravariant checking ensures type safety by preventing potential runtime errors.
  • Bivariant checking allows more flexibility but can lead to unexpected behavior.
  • `strictFunctionTypes` setting enhances type checking accuracy in TypeScript.

Ready to go further?

Related questions