TypeScript NotesRohit’s interview study guide

Interview study guide

TypeScript, type by type.

Everything from my TypeScript study doc, reorganised by topic and filled in where the notes were only a heading or a screenshot. Every example is checked by the real compiler, and every one has a walkthrough of what the type checker is doing.

Chapters
14
Topics
143
Code samples
441
Added beyond the doc
10
01Getting Started & the CompilerWhat TypeScript is, how it runs, and the tsconfig options that matter in interviews.11 topics02Everyday TypesInference, primitives and literals, arrays and tuples, object types, and the special types any, unknown, never and void.15 topics03Interfaces & Type AliasesDescribing object shapes, extending and merging them, function and index signatures, and when to pick interface or type.11 topics04Unions, Narrowing & Type GuardsCombining types with unions and intersections, then narrowing them safely with typeof, instanceof, in, custom guards and discriminated unions.12 topics05Assertions, as const & satisfiesTelling the compiler what you know — and the safer tools (as const, satisfies) that keep it checking.8 topics06FunctionsTyping parameters and returns, overloads and when generics beat them, async functions and this.6 topics07Classes & EnumsWhat TypeScript adds to classes, explicit resource management with using, and enums — plus why many teams prefer literal unions.13 topics08GenericsWriting code that works for many types without losing type safety — functions, interfaces, classes, constraints and defaults.10 topics09Type OperatorsBuilding types from other types and values: keyof, typeof, indexed access and the patterns interviews love.6 topics10Utility TypesThe built-in type transformers — what each does, how it's built, and where it bites.14 topics11Mapped & Conditional TypesThe machinery behind every utility type — mapping over keys, branching on types, infer and template literals.13 topics12Modules & Declaration FilesHow TypeScript describes code it didn't compile — .d.ts files, declare, @types, globals and module augmentation — plus namespaces.11 topics13TypeScript in PracticeTypeScript with React and Node, validating data at runtime, and a couple of typed utilities from the notes.5 topics14Type ChallengesThe "implement this type" questions from the notes, solved step by step.8 topics

Added marks topics that weren’t in my original doc. Tick Learned on a topic to track what you’ve revised.

Sync progress across devices

Type the same private phrase on your Mac and your phone, and your Learned ticks follow you between them — on every study site.

The phrase never leaves this device: only a fingerprint of it is sent, and the server stores a fingerprint of that. Anyone who knows the phrase could see or change your ticks, so pick something you don’t use elsewhere.

Sync is on in this browser.

Sync ID

This ID must be the same on every device. If another device shows a different one, its phrase is different (capital letters count): tap “Turn off here” on it and type the phrase again exactly.