Total Questions : 50
Expected Time : 50 Minutes

1. What is the TypeScript convention for naming variables?

2. In TypeScript, what is the difference between 'interface' and 'type' when defining a new type?

3. Which TypeScript feature allows you to work with a variable that could be of several different types?

4. What is TypeScript's 'type alias' used for?

5. What does the 'as' keyword do in TypeScript?

6. In TypeScript, how do you define a function?

7. What is the TypeScript equivalent of JavaScript's 'for...in' loop?

8. What is TypeScript's 'tuple' data type used for?

9. Which utility type transforms all properties of a type to be read-only?

10. Which TypeScript feature is used to apply metadata to classes, methods, or properties?

11. What is the purpose of the 'interface' keyword in TypeScript?

12. What is TypeScript's equivalent of JavaScript's 'null'?

13. Which TypeScript feature is used to make a property or method in a class inaccessible from outside the class?

14. How do you define an optional property in a TypeScript interface?

15. What is TypeScript primarily used for?

16. Which of the following is a valid way to define a string variable in TypeScript?

17. In TypeScript, how do you define a tuple?

18. What is the purpose of TypeScript's 'import' statement?

19. What is TypeScript's 'class' used for?

20. In TypeScript, how do you declare a variable with a specific type?

21. How can you create a custom type guard in TypeScript?

22. What is the purpose of the 'break' statement in TypeScript?

23. Which TypeScript feature is used to describe the shape of an object, including its properties and their types?

24. How do you define a tuple type in TypeScript?

25. In TypeScript, what is the purpose of the 'namespace' keyword?

26. Which TypeScript feature is used for ensuring code blocks are never reached?

27. In TypeScript, what is the purpose of the 'import' statement?

28. What is the primary goal of TypeScript?

29. In TypeScript, what is the purpose of the 'as' keyword?

30. Which keyword is used to declare a constant variable in TypeScript?

31. What is the TypeScript equivalent of 'undefined' in JavaScript?

32. What is TypeScript's 'module' system used for?

33. Which programming language is TypeScript based on?

34. In TypeScript, what is the purpose of the 'try/catch' statement?

35. What is the correct way to annotate a function return type in TypeScript?

36. What is the purpose of namespaces in TypeScript?

37. How can you declare a variable that can either be a number or a null in TypeScript?

38. What is the purpose of TypeScript's 'interface'?

39. What is TypeScript's 'namespace' used for?

40. What is the purpose of TypeScript's 'enum'?

41. What is a discriminated union in TypeScript?

42. What is the purpose of TypeScript's 'typeof' operator?

43. Which keyword is used to declare a variable in TypeScript?

44. What is the purpose of the 'extends' keyword in generic constraints in TypeScript?

45. In TypeScript, what is the 'this' keyword used for?

46. Which of the following correctly describes the 'Partial' utility type in TypeScript?

47. In TypeScript, how do you define an optional function parameter?

48. What is TypeScript's 'type inference'?

49. What is the TypeScript feature used to combine multiple types into a single type?

50. Which TypeScript keyword is used to declare a constant?