Serving schools, colleges & students across India Sign inRegister freeFAQsHelpcontact@ghosla.io
GHOSLAGrowth Hub for Opportunities, Skills, Learning & AchievementGrow•Learn•Achieve Login Get Started

TypeScript Essentials for JavaScript Developers

Add types to the JavaScript you already know: core types, generics, utility types and migrating real projects

Ghosla Academy · Web Team

TypeScript is JavaScript with types, and most modern frontend and Node.js job descriptions now mention it. This course is written for people who already know JavaScript and want to become productive in TypeScript quickly. You will learn how the compiler works, how to set up a strict tsconfig, and how to type everyday code: functions, arrays, objects, unions and async API calls. The second half covers the features that make TypeScript powerful in real teams: discriminated unions for app states, generics, utility types, keyof and mapped types, declaration files and @types packages. You finish by migrating a JavaScript to-do app to strict TypeScript, the same task many developers face in their first job. Examples use Indian contexts like UPI payments, hostel trip expenses and train bookings, and all tools are free.

What you will be able to do

  • Set up the TypeScript compiler and a strict tsconfig.json in any project
  • Type variables, arrays, tuples and functions and understand type inference
  • Use unions, literal types and narrowing to handle every case safely
  • Model real data with interfaces, type aliases and discriminated unions
  • Write reusable generic functions and use utility types like Partial, Pick and Record
  • Type API responses and migrate an existing JavaScript project step by step

What you build

  • Typed expense splitter for a hostel trip
  • Convert a JavaScript to-do app to strict TypeScript

What you need to start

  • Working knowledge of modern JavaScript (functions, arrays, objects, promises)
  • A laptop with Node.js LTS and VS Code installed, or a browser for the TypeScript Playground

Curriculum · 5 sections, 22 lectures

Getting started with TypeScript3 lectures
  1. Why TypeScript: catch bugs before your users doFree preview10 min
  2. Setting up tsc, tsconfig and VS CodeFree preview12 min
  3. Quiz: TypeScript basics5 min
Core types5 lectures
  1. Primitive types, arrays, tuples and inference14 min
  2. Typing functions: parameters, returns, optional and default13 min
  3. Union types, literal types and narrowing15 min
  4. any vs unknown vs never8 min
  5. Quiz: core types6 min
Modelling objects5 lectures
  1. Type aliases and interfaces13 min
  2. Optional, readonly and index signatures12 min
  3. Discriminated unions for app states14 min
  4. Project: Typed expense splitter for a hostel trip18 min
  5. Quiz: modelling objects6 min
Generics and utility types4 lectures
  1. Generics: reusable typed functions15 min
  2. Utility types: Partial, Pick, Omit, Record13 min
  3. keyof, typeof and mapped types9 min
  4. Quiz: generics and utility types6 min
TypeScript in real projects5 lectures
  1. Typing async code and API responses14 min
  2. Modules, declaration files and @types packages12 min
  3. Migrating a JavaScript project to TypeScript13 min
  4. Project: Convert a JavaScript to-do app to strict TypeScript20 min
  5. Quiz: TypeScript in real projects6 min

Who this is for

  • JavaScript and React learners who keep hitting 'undefined is not a function' bugs
  • College students and freshers targeting frontend or full-stack roles that list TypeScript
  • Node.js developers who want safer, easier-to-refactor backend code