TYPESCRIPT COURSE GUIDE

TypeScript Crash Course for Beginners

A chapter-by-chapter readback of the free course by GlitchyDevs on freeCodeCamp.org.

Length1:00:34
Chapters20
Modules6

The course connects language basics with the practical compile-and-debug workflow: create a TypeScript file, configure JavaScript output, then use source maps and breakpoints. Its later examples connect interfaces, product classes, inheritance, and generic collections rather than stopping at variable annotations.

Who it's for
Read this guide if
  • You know basic JavaScript and want a first walkthrough of TypeScript.
  • You want short examples of typed functions, object structures, interfaces, classes, and generics.
  • You want to compile TypeScript with tsc, run the JavaScript with Node.js, and debug in VS Code.
Skip ahead if
  • You still need an introduction to basic JavaScript.
  • You want a course centered on building a complete application rather than demonstrating individual features.
  • You want a dedicated React or Next.js implementation tutorial; those frameworks appear as suggested next steps.
In brief
  • Runtime: 60 minutes, 34 seconds.
  • Study-guide structure: 20 chapters grouped into 6 thematic modules.
  • Level: TypeScript beginner, with basic JavaScript knowledge expected.
  • Tools: Git, VS Code, Node.js LTS, npm, and the TypeScript compiler.
  • Coverage: annotations, functions, unions, interfaces, classes, generics, and source-map debugging.

The walkthrough

Each chapter below is our original written explanation of what happens at that moment in the video — a paraphrase, not a transcript. Click any timestamp to jump the player.

Foundations and the compiler workflow

0:00

Introduction

Learn how TypeScript adds static type checking to JavaScript and how that differs from allowing variable types to change during execution. The opening also explains transpilation, early error feedback, and the prerequisite of basic JavaScript knowledge.

4:35

Install tools and compile your first file

Set up Git, VS Code, Node.js LTS, and the TypeScript compiler, then create index.ts. A missing Math.floor argument demonstrates editor feedback before the file is compiled to JavaScript and run with Node.js.

7:54

Configure source and output directories

Move the TypeScript file into a source directory and generate a compiler configuration. Configure the source and output locations, compile the project, and run the generated JavaScript from its output directory.

Annotations and typed functions

10:04

Type annotations, inference, and any

Explore explicit annotations, delayed assignment, and the compiler's ability to infer types from initial values. The presenter favors explicit annotations and cautions that any gives up type checking for the affected value.

13:25

Describe object shapes

Annotate an object with required name and age fields, an optional job title, and a nested address. The example shows how property-level types describe the structure an object must satisfy.

14:33

Type functions and flexible parameter lists

Specify parameter and return types using an area calculation, then explore optional, default, and rest parameters. Numeric summation, arrow functions, and anonymous functions demonstrate several ways to write typed operations.

19:46

Distinguish void from never

Separate functions that produce no meaningful return value from functions that never return normally. The examples associate never with thrown exceptions, infinite loops, and unreachable code.

Compose types and model collections

20:53

Unions, literals, and nullable values

Allow a value to belong to several specified types, or restrict it to exact options such as directions and colors. Nullable examples represent absent usernames and ages explicitly, including a greeting that handles a null username.

24:52

Type aliases and intersections

Give reusable names to primitive, union, and object types, including an Employee structure with optional email. Then combine existing types with an intersection so the resulting type includes their members.

27:02

Arrays, tuples, and enums

Constrain array elements to a single type or a union, and use a tuple to describe differently typed positions. A days-of-the-week enum introduces named numeric options and looking up a name from its numeric value.

Interfaces and object contracts

30:08

Interface properties and method signatures

Define the properties an object must provide, then add a greeting method with a typed parameter and void return. The Person examples show how an interface describes both data and callable behavior.

32:54

Reopen interfaces and explore DOM types

Combine repeated interface declarations into a settings structure that includes a readonly property and additional fields. The lesson then introduces built-in DOM interfaces through image-element properties and behavior.

37:36

Compare interfaces and type aliases

Compare the two ways of naming custom types, with particular attention to interface declaration merging. The presenter discusses choosing interfaces for object contracts and aliases for unions, intersections, and other type combinations.

Classes, encapsulation, and inheritance

39:54

Typed classes and access modifiers

Build a product class with typed properties, constructor parameters, and a method returning product information. Compare public, private, and protected members to control where class details can be accessed.

43:00

Accessors, static members, and interface implementation

Use a getter and setter to manage a price while rejecting negative values, then generate product IDs through class-level static members. A class implementation example supplies the fields and methods required by an interface.

46:09

Abstract classes and polymorphism

Define an abstract base class with a method that subclasses must implement. Derived objects then provide different information methods while being referenced through a common base-class type.

Generics, assertions, and debugging

50:01

Generic functions and reusable collections

Use type parameters to preserve relationships between function inputs and outputs, including examples with two different types. Generic class examples introduce a default type and collections that accept only objects matching their chosen item type.

55:17

Type assertions

See an assertion tell the compiler to treat an any-typed value as a string before calling a string method. The segment presents assertions as a way to supply type information the compiler has not determined.

56:20

Debug TypeScript in VS Code

Enable source maps, recompile, and configure a Node.js launch with a TypeScript build task. Use breakpoints, stepping controls, the Variables panel, and Watch expressions to inspect execution.

59:10

Continue practicing and exploring configuration

The closing advice emphasizes writing code and trying TypeScript in new React or Next.js projects. It also points to open-source code, official documentation, and experiments with compiler configuration as ways to continue learning.

Moment by moment

TimeWhy it matters
5:55A missing Math.floor argument shows how the editor catches a problem before execution.
20:53Union types introduce controlled alternatives without allowing every possible value.
32:54Repeated interface declarations expand one shared object contract.
50:01Generics shift the examples toward reusable code with type relationships preserved.
56:20Source maps connect compiled JavaScript execution to TypeScript debugging.

Do this next

  1. Recreate the index.ts setup, configure separate source and output directories, compile with tsc, and run the generated JavaScript with Node.js.
  2. Write an Employee type with an optional email and a greeting function that accepts string or null; try valid and invalid inputs to observe compiler feedback.
  3. Rebuild the generic collection example for books, then enable source maps and step through its add method while watching the collection's data array.

Common questions

Do I need JavaScript knowledge before taking this course?

Yes. The presenter explicitly names basic JavaScript knowledge as the prerequisite; the lessons focus on adding types and using the TypeScript workflow.

What do I need installed to follow along?

The setup uses Git, Visual Studio Code, Node.js LTS, and a globally installed TypeScript compiler through npm. The walkthrough compiles TypeScript with tsc and executes the generated JavaScript with Node.js.

Does the course cover more than basic type annotations?

Yes. It continues into interfaces and declaration merging, classes and access modifiers, abstract classes and polymorphism, generic functions and collections, type assertions, and VS Code debugging.

Does the tutorial build a React or Next.js application?

The supplied lessons demonstrate individual language features with examples such as products, greetings, and collections. React and Next.js appear in the closing suggestions for further practice, rather than as a framework application walkthrough.

Spot a mistake?

Every summary is hand-checked against the video. If you notice an error in a timestamp, explanation, or attribution, email us with the relevant detail so we can review it.

More course guides