Top 50+ Most Asked TypeScript Interview Questions

A focused collection of the most critical TypeScript interview questions covering type system internals, advanced types, and best practices for modern development.

0%

Overall Progress

0/50

1.What is TypeScript and why use it over JavaScript?

2.What is the difference between any, unknown, and never types?

3.What is the difference between interface and type alias?

4.What are union types and intersection types?

5.What is type inference in TypeScript?

6.What is type assertion? (as vs <> syntax)

7.What is the difference between null and undefined?

8.What are generics? Why are they useful?

9.What is tsconfig.json and its important options?

10.What is strictNullChecks?

11.What are optional chaining (?.) and nullish coalescing (??)?

12.What is the readonly modifier?

13.What are literal types?

14.What is type narrowing and type guards?

15.What is the keyof operator?

16.How do you define optional and default parameters?

17.What is function overloading in TypeScript?

18.What are rest parameters with TypeScript?

19.How do you type arrow functions?

20.What is the this parameter type?

21.How do you create generic functions?

22.What is ReturnType<T> utility type?

23.What are optional properties in interfaces?

24.What is interface declaration merging?

25.What are index signatures?

26.What are access modifiers: public, private, protected?

27.What is the difference between private and #private?

28.What are abstract classes and methods?

29.What is the difference between extends and implements?

30.What are parameter properties in classes?

31.What are static members?

32.What are getters and setters?

33.What are utility types? (Partial, Required, Pick, Omit, Record)

34.What is Partial<T> and when to use it?

35.What is Pick<T, K> and Omit<T, K>?

36.What are mapped types?

37.What are conditional types?

38.What is the infer keyword?

39.What are discriminated unions (tagged unions)?

40.What are custom type guards using is keyword?

41.What is as const assertion?

42.What are tuple types?

43.What are enums? Difference between numeric and string enums?

44.What are const enums?

45.What is the difference between modules and namespaces?

46.What are declaration files (.d.ts)?

47.What is the declare keyword?

48.How do you add TypeScript to an existing JavaScript project?

49.How do you handle external JavaScript libraries without types?

50.What are common TypeScript errors and how to fix them?