What is the difference between Parameters and ConstructorParameters?

TypeScript Associate Hard

TypeScript Associate — Hard

What is the difference between Parameters and ConstructorParameters?

Key points

  • Parameters extracts from function types; ConstructorParameters from class constructors
  • Understanding this difference helps in accurately defining types in TypeScript
  • ConstructorParameters is specific to class constructors, not general functions

Ready to go further?

Related questions