Back to Prep Library
TS
Category Blueprint

TypeScript Interview Library

Advanced types, generic abstractions & type-safety

Questions50
Views31.5k
Upvotes2.1k
Filter

Question Catalog

(50 visible)
TS
TypeScript· Frontend

How do you make values immutable in TypeScript?

1.1k11
easy
TS
TypeScript· Frontend

How do you do exhaustiveness checking?

88431
easy
TS
TypeScript· Frontend

What is the difference between interface and type?

85931
easy
TS
TypeScript· Frontend

What is the difference between any and unknown?

75910
easy
TS
TypeScript· Frontend

What is TypeScript and why use it over JavaScript?

66523
easy
TS
TypeScript· Frontend

What are tuple types?

62922
easy
TS
TypeScript· Frontend

How do you safely work with JSON of unknown shape?

44975
easy
TS
TypeScript· Frontend

What are literal types?

42674
easy
TS
TypeScript· Frontend

How does TypeScript handle null and undefined safely?

2858
easy
TS
TypeScript· Frontend

What are access modifiers in TypeScript classes?

19058
easy
TS
TypeScript· Frontend

What is the definite assignment assertion (!)?

1.1k56
medium
TS
TypeScript· Frontend

What is type narrowing and what are type guards?

1.1k34
medium
TS
TypeScript· Frontend

What are generic constraints?

1.1k1
medium
TS
TypeScript· Frontend

What are union and intersection types?

1.1k69
medium
TS
TypeScript· Frontend

What do ReturnType and Parameters do?

1.0k35
medium
TS
TypeScript· Frontend

What are generics and why are they useful?

1.0k39
medium
TS
TypeScript· Frontend

What is ReadonlyArray and readonly tuple?

99845
medium
TS
TypeScript· Frontend

What are type assertions and when should you use them?

9666
medium
TS
TypeScript· Frontend

What are abstract classes?

82073
medium
TS
TypeScript· Frontend

What is declaration merging?

81262
medium
TS
TypeScript· Frontend

What does the declare keyword do?

76449
medium
TS
TypeScript· Frontend

How does the 'in' operator narrow types?

73614
medium
TS
TypeScript· Frontend

What do Exclude, Extract, and NonNullable do?

60847
medium
TS
TypeScript· Frontend

What are utility types like Partial, Pick, and Omit?

59468
medium
TS
TypeScript· Frontend

What does the 'strict' flag in tsconfig enable?

53658
medium
TS
TypeScript· Frontend

What is a discriminated union?

49350
medium
TS
TypeScript· Frontend

What is an index signature?

3189
medium
TS
TypeScript· Frontend

Can generics have default types?

30827
medium
TS
TypeScript· Frontend

What is structural typing?

28826
medium
TS
TypeScript· Frontend

How do you get a union of an object's values as a type?

20745
medium
TS
TypeScript· Frontend

What is the Awaited utility type?

19940
medium
TS
TypeScript· Frontend

What do keyof and typeof do in TypeScript?

16773
medium
TS
TypeScript· Frontend

What is the never type?

11312
medium
TS
TypeScript· Frontend

What are assertion functions (asserts)?

1.1k57
hard
TS
TypeScript· Frontend

What is key remapping in mapped types?

1.1k6
hard
TS
TypeScript· Frontend

What are enums and what are their trade-offs?

94754
hard
TS
TypeScript· Frontend

What are mapped types?

87266
hard
TS
TypeScript· Frontend

How would you build a DeepPartial type?

85772
hard
TS
TypeScript· Frontend

What are indexed access types?

75835
hard
TS
TypeScript· Frontend

What are declaration files (.d.ts)?

72868
hard
TS
TypeScript· Frontend

What are template literal types?

57358
hard
TS
TypeScript· Frontend

What is module augmentation?

46158
hard
TS
TypeScript· Frontend

What are recursive types?

44072
hard
TS
TypeScript· Frontend

What does the infer keyword do?

38145
hard
TS
TypeScript· Frontend

What are function overloads?

36514
hard
TS
TypeScript· Frontend

What is a polymorphic 'this' type?

34646
hard
TS
TypeScript· Frontend

What are covariance and contravariance?

31923
hard
TS
TypeScript· Frontend

What are conditional types?

23432
hard
TS
TypeScript· Frontend

What does the satisfies operator do?

21579
hard
TS
TypeScript· Frontend

What are branded (nominal) types?

15651
hard

Difficulty Distribution

Easy10 (20%)
Medium23 (46%)
Hard17 (34%)

Tested Topics

#narrowing#never#unknown#generics#keyof#readonly#immutability#exhaustive

Study Guide

Practice advanced mapped/conditional types, utility implementations, type assertion guards, and strict configuration parameters.