Programming · Intermediate

TypeScript

JavaScript with the mistakes caught before you run it — and without giving up any of the language.

Lessons
14 lessons
Total runtime
31 hours of video
Modules
5 modules
Optional lessons
11 optional
Start course

Free. No account.

About this course

TypeScript is JavaScript with a type checker bolted on, and that description undersells it. The types are erased before anything runs, so the language you ship is still JavaScript — but the half-hour you used to spend finding out that an API returned null becomes a red squiggle you see while typing.

The order here is short-to-long on purpose. Fireship's two minutes explain what the tool is for, his longer video shows the syntax at speed, and Traversy's crash course is where it becomes something you can actually use on a project. The freeCodeCamp course at the end is the reference version.

The part worth slowing down for is generics. They are the point at which TypeScript stops feeling like annotation and starts feeling like a language of its own, and they are also where most people give up and write any. Writing any is not a crime, but a course that leaves you unable to read somebody else's generic has not finished its job.

About an hour of required video, and around thirty if you work through the optional lessons as well. Most of that is three alternative full courses; the shorter lessons on generics and on React are where the actual difficulty lives. You need real JavaScript before this — TypeScript makes an existing language safer, and there is no way to learn it as your first one.

What you'll be able to do

  • Annotate variables, functions and objects, and know when to let inference do it for you
  • Model data with interfaces, type aliases and unions
  • Read and write a generic without reaching for any
  • Configure tsconfig well enough to add TypeScript to an existing project
  • Understand that types vanish at runtime, and what follows from that

Curriculum

14 lessons · 31 hours

What It Is

2 lessons · 14m

  1. 01CompletedTypeScript in 100 SecondsFireshipVideoThe pitch in two minutes: same language, checked before it runs. Note the claim that types disappear at compile time — it explains most of TypeScript's design.2m
  2. 02CompletedTypeScript - The BasicsFireshipVideoThe syntax at speed. Dense enough that you will want to pause, and short enough that a second watch costs nothing.12m

Using It On Something Real

4 lessons · 8h 49m

  1. 03CompletedTypeScript Crash CourseTraversy MediaVideoWhere it becomes practical: setting up the compiler, typing real functions, and the interfaces and generics that make the type system worth having rather than merely present.53m
  2. 04CompletedLearn TypeScript – Full TutorialOptionalfreeCodeCamp.orgVideoOptional. The thorough treatment, useful mainly as something to search when a specific type problem stops you. Generics get proper time here, which is the section most worth returning to.4h 46m
  3. 05CompletedTypeScript Tutorial for BeginnersOptionalProgramming with MoshVideoAn hour covering the same ground as the crash course at a slightly gentler pace, with more attention to configuring the compiler — the part that trips people up on their first real project.1h 4m
  4. 06CompletedLearn TypeScript — Full Course for BeginnersOptionalfreeCodeCamp.orgVideoTwo hours, and the best middle option: longer than a crash course, far shorter than the eight-hour treatments further down.2h 6m

The Type System Proper

3 lessons · 53m

  1. 07CompletedLearn TypeScript Generics In 13 MinutesOptionalWeb Dev SimplifiedVideoGenerics are the wall almost everyone hits, and this is the shortest useful explanation of them. Thirteen minutes that decide whether you keep writing any.13m
  2. 08CompletedGenerics — The Most Intimidating TypeScript FeatureOptionalMatt PocockVideoFrom the person who writes most of the good TypeScript teaching material. He builds a generic up from an ordinary function rather than presenting it finished, which is why it sticks.18m
  3. 09CompletedTypeScript Generics Are Easy Once You Know ThisOptionalByteGradVideoA third angle on the same feature, with more real-world signatures. Take it if the first two left you able to read generics but not write them.22m

TypeScript with React

3 lessons · 3h 16m

  1. 10CompletedTypeScript in React — Complete TutorialOptionalByteGradVideoTyping props, state, events and hooks, which is where most people actually meet TypeScript. The generic types React ships with are unfriendly on first contact and this makes them ordinary.53m
  2. 11CompletedAll The TypeScript You Need for React DevelopmentOptionalPedroTechVideoDeliberately narrow: only the subset of TypeScript a React developer uses, and nothing else. A good filter if the language feels larger than the job requires.50m
  3. 12CompletedReact & TypeScript — Course for BeginnersOptionalfreeCodeCamp.orgVideoThe longer treatment, building a typed application end to end rather than demonstrating features in isolation.1h 33m

The Long Version

2 lessons · 17h 57m

  1. 13CompletedTypeScript Full Course for BeginnersOptionalDave GrayVideoEight hours covering the whole language including the parts most courses avoid — utility types, generics in depth, declaration files. Reference material you work through slowly.8h 22m
  2. 14CompletedPractical TypeScript — Course for BeginnersOptionalfreeCodeCamp.orgVideoNine hours built around Zod, real API responses and validation at runtime, which is the honest version of the problem: types disappear when the code runs, and data from a server does not respect them.9h 35m

Credits

Every lesson in this course was made by one of these channels. Tubeversity sequenced them; it did not make them. If a course is useful to you, the people below are the ones who earned it.