Need Assistance?

support@tutorialshub.in

Core Types & Special Types

void, never, null & undefined

ADVERTISEMENT
TypeScript Free Lesson
5 min read
ADVERTISEMENT
  • void — Used for functions that don't return a value (e.g., logging or event handlers).
  • never — Used for functions that never finish normally (they always throw an error or run an infinite loop).
  • null & undefined — With strictNullChecks enabled, you must explicitly allow them with a union like string | null.
ADVERTISEMENT
Hi, I'm Tuby! Here to help you