This repository contains my personal practice and code implementations from the 4.5-hour oneshot Chai aur Code TypeScript series on YouTube.
The ts-notes folder contains my structured, Obsidian-ready Markdown notes documenting everything I have learnt throughout the course, complete with code walk-throughs and concepts.
The workspace is organized as follows:
src/: Contains core TypeScript exercise files covering various syntax, paradigms, and features implemented during the series.dist/: Compiled JavaScript output and declaration files generated by the TypeScript compiler (tsc).reactTs/: A React (v19) + Vite (v8) + TypeScript web application built as part of the practice.ts-notes/: Obsidian-ready Markdown notes matching the structured topics.
This folder contains command-line interface exercise files for pure TypeScript.
From the root directory, install the required packages:
npm installCompile TypeScript code using:
npm run dev(This triggers npx tsc based on settings in tsconfig.json)
Execute the compiled JavaScript output:
npm startA React web application setup using Vite and TypeScript.
cd reactTsnpm installStart the interactive Vite development server:
npm run devnpm run buildBelow is a breakdown of the specific concepts and practices explored in the codebase:
| Topic | Source File | Obsidian Notes | Description |
|---|---|---|---|
| Fundamentals | typesInTS.ts | typesInTS.md | Basic data types and type annotations. |
| Functions | functionTS.ts | functionTS.md | Parameter types, return types, optional/default parameters. |
| Objects | objectsTS.ts | objectsTS.md | Typing object structures, optional properties, read-only. |
| Arrays & Enums | ArrayEnum.ts | ArrayEnum.md | Working with array types, tuples, and numeric/string Enums. |
| Unions & Any | unionAndAny.ts | unionAndAny.md | Handling multiple types, type-casting, and the any/unknown types. |
| Interfaces | interface.ts | interface.md | Declaring and using interface definitions. |
| Interfaces Pt. 2 | interfacePt2.ts | interfacePt2.md | Extending interfaces, declaration merging, class implementations. |
| Type Narrowing | typeNarrowing.ts | typeNarrowing.md | typeof, instanceof, truthiness guards, and custom type predicates. |
| Advanced Types | moreTypes.ts | moreTypes.md | Type aliases, intersections, literal types, and utility types. |
| Generics | generics.ts | generics.md | Generic functions, generic classes, constraints, and utility interfaces. |
| OOP | oop.ts | oop.md | Classes, constructors, access modifiers (public/private/protected), inheritance. |
| Web & Fetch Requests | webReq.ts / fetchReq.ts | webReq.md / fetchReq.md | Making asynchronous network calls using Axios and Fetch API with typed responses. |