Total Questions : 30
Expected Time : 30 Minutes

1. What is the use of the 'this' parameter in TypeScript functions?

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

3. What is the use of the 'declare' keyword in TypeScript?

4. What is the purpose of TypeScript's 'as' keyword?

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

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

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

8. What TypeScript feature allows for specifying an exact set of string values for a type?

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

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

11. What is a discriminated union in TypeScript?

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

13. What is TypeScript?

14. What is the TypeScript convention for naming classes?

15. In TypeScript, what is the 'any' type used for?

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

17. Which operator is used to specify a type guard in TypeScript?

18. What is the purpose of TypeScript's 'class' keyword?

19. What does the 'is' keyword do in a TypeScript type predicate?

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

21. Which of the following allows TypeScript to infer the return type of a function?

22. How do you define a function in TypeScript?

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

24. Which data type represents a collection of values in TypeScript?

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

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

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

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

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

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