What does the ‘never’ type represent in TypeScript?

TypeScript Associate Medium

TypeScript Associate — Medium

What does the ‘never’ type represent in TypeScript?

Key points

  • 'never' is specifically for functions that don't return
  • It is not a placeholder for undefined types
  • It is not an alias for 'undefined' in strict mode

Ready to go further?

Related questions