Which TypeScript type represents the absence of a value returned from a function?

TypeScript Associate Easy

TypeScript Associate — Easy

Which TypeScript type represents the absence of a value returned from a function?

Key points

  • void is specifically used for functions that do not return a value
  • null and undefined represent specific values, not the absence of a return value
  • never is used for functions that never complete normally

Ready to go further?

Related questions