epam-short-track

TypeScript cross interview #3

  1. What is the main difference between TypeScript and JavaScript?
  2. What advantages does TypeScript provide in large projects?
  3. What are the primitive types in TypeScript?
  4. How do you define and use enums in TypeScript?
  5. What is structural typing and how does it differ from nominal typing in TypeScript?
  6. How do you declare a union type in TypeScript?
  7. How do you use union and intersection types? What is the difference between them?
  8. How can you compose multiple types into one in TypeScript?
  9. What does the Partial<T> utility type do?
  10. What is the difference between Required<T> and Readonly<T>?
  11. What is the difference between Omit<T, K> and Pick<T, K>?
  12. How do you use the keyof operator in TypeScript?
  13. What is the typeof operator used for in TypeScript?
  14. How do conditional types work in TypeScript?
  15. What is a template literal type and how is it used?
  16. How does the infer keyword work in conditional types?
  17. What is mapped types and how do you create one?
  18. What is a named tuple in TypeScript and how it differs from array that holds multiple types?
  19. What is the difference between an object type and a Record type?
  20. What does the as const assertion do in TypeScript and when is it useful?
  21. How do you implement function overloads in TypeScript?
  22. What are generics in TypeScript and how do you use them in functions?
  23. How do you define and use abstract classes in TypeScript?
  24. What are access modifiers in TypeScript and how do they affect class members?
  25. What are the main differences between interface and type in TypeScript?
  26. What is the difference between never and void?
  27. Can you inherit from multiple types in TypeScript? How is it done?
  28. How do you create a type excluding some properties from another type?
  29. How do you specify a variable number of arguments in a function with types?
  30. What are Type Guards and how do they help when working with different types?