TypeScript — Learning Roadmap
Estimated Time to Job-Ready
4-6 weeks of consistent learning (2-3 hours/day), assuming solid JavaScript fluency already — TypeScript builds directly on JavaScript rather than re-teaching it, so most of the time here goes to the type system itself, not general programming fundamentals.
Phase 1: Basic Types & Setup (Week 1)
tsconfig.json, and understand strict, target, module, outDir well enough to explain what each doestsc surfaces one at a timeCheckpoint: can you explain why let count = 5; doesn't need a : number annotation, but a function parameter almost always does? (Inference works from an initial value the compiler can already see; a function parameter has no initial value until it's called, so the compiler has nothing to infer from.)
Phase 2: Building Real Type-Safe Code (Week 2-3)
Partial, Pick, Omit, Record, and reading their built-in type definitions to understand how they actually worktypeof, instanceof, and discriminated unionsfetch, with a generic response typeCheckpoint: given a union type type Shape = Circle | Square, can you write a function that safely accesses radius only on the Circle branch, using a discriminated union tag — without a single manual type cast?
Phase 3: Working With Real-World Code (Week 4)
@types packages, writing a minimal local .d.ts for anything untypedimport/export) across a multi-file projectCheckpoint: you hit Property 'x' does not exist on type 'unknown' on a third-party library's return value. What are your actual next diagnostic steps, in order? (Check if @types/ exists and is installed; if not, check the library's own bundled types; if genuinely untyped, narrow or write a minimal local declaration rather than reaching for any immediately.)
Phase 4: Advanced Types & Interview Readiness (Week 5-6)
infer, and mapped types — enough to read (not necessarily author from scratch) how a library's own advanced type definitions workstrict: true actually does, not just that turning it on is "good practice"interface vs type, any vs unknown, and type erasure out loud, not just recognizing the answer when reading itCommon Pitfalls Specific to TypeScript (Not Generic Study Advice)
any the moment a type error is inconvenient — this defeats the entire point locally, and it silently spreads: any code that consumes an any-typed value also loses type safety, often without anyone noticing until much later. Reach for unknown plus a narrowing check instead.as that doesn't actually match reality, both slip straight past the type system.strict and trying to fix every resulting error at once on a large existing codebase — this is real, painful work; incremental adoption (// @ts-expect-error on genuinely unfixed lines, tracked deliberately) is usually more realistic than a single big-bang fix.enum as the only option for a fixed set of values — a string-literal union often compiles to nothing extra at runtime and is preferred in many real codebases; know both and the tradeoff, don't default blindly.Getting Your First TypeScript-Heavy Role
.ts file extensions with any scattered through them, which is easy for an interviewer to spot in a code sample.@types packages, tsconfig.json's key options, and at least one framework's TypeScript integration (React, Next.js, or Node/Express) relevant to the roles you're targeting.interface vs type, any vs unknown, and type erasure come up constantly precisely because they distinguish real hands-on experience from having only skimmed the syntax.
