A structured TypeScript learning repository — 10 topic folders, each with real code examples, theory notes, and interview prep questions. Built for JavaScript developers making the jump to TypeScript.
No course platform, no paywall. Clone it, open a folder, read the instructions.txt, run the code. Each topic is self-contained so you can work through it linearly or jump to what you need.
- JavaScript developers moving to TypeScript and needing a structured path
- Intermediate devs who know the basics but want to solidify generics, utility types, and advanced patterns
- Students preparing for TypeScript interview questions
One prerequisite: a working understanding of JavaScript (ES6+). Everything TypeScript-specific is explained from scratch.
| Folder | Topic | What You'll Learn |
|---|---|---|
01_intro |
Introduction & Setup | What TypeScript is, installing the compiler, tsconfig.json basics |
02_Basics |
Fundamental Types | number, string, boolean, type annotations, type inference |
Array |
Arrays & Config | Typed arrays, tsconfig options, strict mode |
TypeAliases |
Type Aliases | Defining reusable custom types with type |
Readonly_optional |
Readonly & Optional | readonly modifier, optional properties (?) in types and interfaces |
Tuples |
Tuples | Tuple types vs arrays, fixed-length typed sequences, advanced usage |
anyVsUnkown |
any vs unknown |
When to use each, type narrowing, why unknown is safer |
unionAndIntersection |
Union & Intersection | ` |
interface |
Interfaces | Object shapes, implementing interfaces in classes, interface inheritance vs type |
classes |
Classes | OOP in TypeScript — constructors, access modifiers, inheritance |
Generics |
Generics | Generic functions and classes, constraints, real-world use cases |
Each folder contains:
instructions.txt— theory, explanations, and interview-style questions- TypeScript source files — working code examples you can run and modify
git clone https://github.com/Wcoder547/typeScript.git
cd typeScriptnpm install -g typescriptcd 01_intro
tsc index.ts
node index.js01_intro → 02_Basics → Array → TypeAliases → Readonly_optional
→ Tuples → anyVsUnkown → unionAndIntersection → interface → classes → Generics
Generics last — they make a lot more sense once you've seen interfaces and classes first.
- Node.js installed (nodejs.org)
- Basic JavaScript (ES6+) — arrow functions, destructuring, classes, modules
Corrections, improvements, and new examples are welcome.
- Fork the repository
- Create a branch:
git checkout -b fix/your-fix - Commit and push your changes
- Open a Pull Request with a short description
This repo came from learning TypeScript properly — not just adding : string to variables, but understanding the type system: why unknown exists, when generics actually help, how interfaces and type aliases differ in practice, and how TypeScript's structural typing works.
Each folder is the result of working through a concept until it clicked, then writing it down in a way that would have helped me earlier.
Built by Waseem Akram — Full-Stack Developer and DevOps Engineer based in Pakistan, working across the MERN stack, Generative AI integrations, and cloud automation.
If this helped you, consider giving it a ⭐