TypeScript
57 highly-curated topics available for revision.
1. Fundamentals
Type Inference
HighHow TypeScript automatically figures out types so you don't have to.
any vs unknown
HighThe difference between TypeScript's two 'catch-all' types.
never vs void
MediumUnderstanding the difference between functions that return nothing and functions that never return.
Type Assertions
MediumOverriding TypeScript's inferred types when you know better than the compiler.
Structural Typing
HighTypeScript's core philosophy: Duck Typing.
Type Widening & Narrowing
HighHow TypeScript infers general types from specific values, and how you restrict them back down.
2. Unions & Intersections
Union Types
HighCombining multiple types into one, representing an OR relationship.
Intersection Types
HighCombining multiple types into one, representing an AND relationship.
Discriminated Unions
HighThe most robust way to handle complex state and union types in TypeScript.
Exhaustive Checking
HighEnsuring all possible cases of a union are handled at compile time.
3. Type Narrowing
Type Guards
HighTechniques for narrowing down broad types into specific types.
Custom Type Guards
HighWriting your own functions to help TypeScript narrow complex types.
Assertion Functions
MediumNarrowing types by throwing errors instead of returning booleans.
Control Flow Analysis
HighHow the TypeScript compiler reads your code like a JavaScript engine.
4. Interfaces & Types
Interfaces vs Types
HighUnderstanding the differences between the two ways to define object shapes.
Interface Extension
MediumBuilding complex interfaces from simpler ones using the extends keyword.
Declaration Merging
HighHow TypeScript combines multiple declarations with the same name into a single definition.
Index Signatures
MediumDefining types for objects where you don't know the property names ahead of time.
5. Generics
Generics
HighWriting reusable, type-safe code that works over a variety of types.
Generic Constraints
HighRestricting the types that can be passed into a Generic parameter.
Generic Inference
MediumHow TypeScript automatically figures out Generic types from context.
Generic Classes
HighApplying generics to object-oriented classes and data structures.
6. Utility Types
7. Advanced Types
keyof, typeof, and infer
HighThe core operators for querying and extracting types.
Conditional Types
HighWriting IF/ELSE logic at the type level.
Template Literal Types
MediumString interpolation at the type level.
Recursive Types
MediumTypes that reference themselves to model infinitely nested data.
Type-Level Programming
Using the TypeScript type system as a Turing-complete programming language.
8. Functions
9. Classes
Classes in TypeScript
HighHow TypeScript enhances standard JavaScript classes with types.
Access Modifiers
HighControlling the visibility of class properties and methods.
Abstract Classes
MediumBase classes that cannot be instantiated directly, but require subclasses to implement specific methods.
implements vs extends
HighUnderstanding the difference between inheriting from classes and fulfilling interfaces.
10. Modules
Modules in TypeScript
HighHow TypeScript handles isolating and sharing code between files.
Type-Only Imports
MediumOptimizing compilation by explicitly importing types separately from values.
Declaration Files (.d.ts)
HighProviding type information for untyped JavaScript libraries.
Module Augmentation
HighPatching existing modules to add new types or properties.
11. Compiler
12. Backend
Runtime vs Compile Time
HighThe most important concept for using TypeScript in a backend environment.
Sharing API Types
HighKeeping the frontend and backend in perfect sync.
Runtime Validation
HighProtecting your Node.js application from malicious or malformed data.
Type-Safe Errors
MediumHandling the 'unknown' nature of exceptions in TypeScript.
Zod & TypeScript
HighThe industry standard for syncing compile-time types with runtime validation.
13. Coding Challenges
Implementing DeepPartial
HighA common interview challenge: Making nested properties optional.
Implementing DeepReadonly
MediumA common interview challenge: Freezing nested objects at compile time.
Union to Intersection
The hardest TypeScript interview question: Converting A | B into A & B.
Type Challenges (Tips)
MediumHow to approach advanced TypeScript challenges in interviews.
14. Interview Questions
Senior TypeScript Questions
HighHigh-level architectural and theoretical questions for senior roles.
Output-Based Questions
HighTricky code snippets testing your deep understanding of TS quirks.
Coding Interviews (TypeScript)
HighHow to handle live-coding interviews using TypeScript.