Browse all TypeScript lessons.

showing All 81 lessons...

Simplify asynchronous callback functions using async/await

P

Practical Generics in TypeScript

P

The Basics of Generics in TypeScript

P

Sharing Class Behavior with Inheritance in TypeScript

P

Using Interfaces to Describe Types in TypeScript

P

Union Types and Type Aliases in TypeScript

P

Using Assertion to Convert Types in TypeScript

P

Distinguishing between types of Strings in TypeScript

P

Using Type Inference in TypeScript

Creating a Class in TypeScript

P

Introduction to Static Typing

Function Overloads in Typescript

P

TypeScript - Generating Definition Files

P

TypeScript - Definition Files

P

TypeScript - Understanding Decorators

P

Compiling TypeScript with WebStorm

P

Installing TypeScript and Running the TypeScript Compiler (tsc)

TypeScript - Using Typings and Loading From node_modules

P

TypeScript - Reflection and Decorator Metadata

P

Using Lodash in TypeScript with Typings and SystemJS

P

TypeScript - Using Exclude and RootDir until File Globs Lands in 2.0.

P

Stopping a TypeScript Build When Errors Are Found

P

TypeScript - What Happens to Compiled Interfaces

P

Configuring TypeScript Which Files to Compile with "Files" and "OutDir"

P

Configuring a New TypeScript Project

Loading Compiled TypeScript Files in Browser with SystemJS

P

Understanding Generics with RxJS

P

Introduction to Generics in Typescript

P

Typescript Enums vs Booleans when Handling State

P

TypeScript Up and Running in Seconds

P

Catching JavaScript Mistakes with TypeScript

P
typescript tutorial about Simplify asynchronous callback functions using async/await

Simplify asynchronous callback functions using async/await

1:48 typescript PRO

Learn how to write a promise based delay function and then use it in async await to see how much it simplifies code over setTimeout.

Lets say you want to call a function after 1s, 2s, 3s. You can use setTimeout, or you can wrap it up into a simple delay function that works with async/await

typescript tutorial about Practical Generics in TypeScript

Practical Generics in TypeScript

2:52 typescript PRO

Typescript generics are great for writing code that accepts any type. How do we write code that doesn’t accept any type, but instead accepts a range of types? In this lesson we learn how to use generic classes, interfaces and constraints to be more specific with our Typescript generics.

typescript tutorial about The Basics of Generics in TypeScript

The Basics of Generics in TypeScript

2:07 typescript PRO

It can be painful to write the same function repeatedly with different types. Typescript generics allow us to write 1 function and maintain whatever type(s) our function is given. This lesson covers syntax and a basic use case for Typescript generics.

typescript tutorial about Sharing Class Behavior with Inheritance in TypeScript

Sharing Class Behavior with Inheritance in TypeScript

3:42 typescript PRO

Typescript classes make inheritance much easier to write and understand. In this lesson we look into how to set up inheritance with Typescript classes, extends and super.

typescript tutorial about Using Interfaces to Describe Types in TypeScript

Using Interfaces to Describe Types in TypeScript

3:32 typescript PRO

It’s easy to pass the wrong value to a function. Typescript interfaces are great because they catch errors at compile time or in an IDE. In this lesson we’ll learn how to describe a type shape with Typescript interfaces.

typescript tutorial about Union Types and Type Aliases in TypeScript

Union Types and Type Aliases in TypeScript

5:01 typescript PRO

Sometimes we want our function arguments to be able to accept more than 1 type; e.g. a string or an array. This lesson will show us how to assign more than 1 type to a variable with Typescript union types and type aliases.

typescript tutorial about Using Assertion to Convert Types in TypeScript

Using Assertion to Convert Types in TypeScript

2:09 typescript PRO

Sometimes the compiler needs help figuring out a type. In this lesson we learn how to help out the compiler with Typescript type assertion.

typescript tutorial about Distinguishing between types of Strings in TypeScript

Distinguishing between types of Strings in TypeScript

2:02 typescript PRO

In JavaScript, many libraries use string arguments to change behavior. In this lesson we learn how Typescript catches string related errors at compile time by assigning a string literal as a type.

typescript tutorial about Using Type Inference in TypeScript

Using Type Inference in TypeScript

2:52 typescript

This lesson explains how the Typescript compiler uses inference to guess what types we’re using, so we don’t have to annotate all the things.

typescript tutorial about Creating a Class in TypeScript

Creating a Class in TypeScript

4:00 typescript PRO

Typescript classes make traditional object oriented programming easier to read and write. In this lesson we learn about class syntax, what the constructor is and some interesting variable features.

typescript tutorial about Introduction to Static Typing

Introduction to Static Typing

1:39 typescript

This is a basic introduction to static typing with Typescript.
In this lesson we will learn about simple types in TypeScript.

typescript tutorial about Function Overloads in Typescript

Function Overloads in Typescript

3:46 typescript PRO

It's common in Javascript for functions to accept different argument types and to also return different types. In this lesson we learn how to 'teach' Typescript about these dynamic functions so that we can still benefit from the powerful static type analysis.

typescript tutorial about TypeScript - Generating Definition Files

TypeScript - Generating Definition Files

2:41 typescript PRO

TypeScript allows you to generate definition files for your own libraries. This lesson shows you how to organize your project and generate the definition files so that others projects can use your library with TypeScript.

typescript tutorial about TypeScript - Definition Files

TypeScript - Definition Files

5:51 typescript PRO

TypeScript definition files can be an extremely confusing topic to tackle due to the sheer variety and of features and libraries they need to cover. This lesson helps you understand definition files, how they're used, and where to find them based on many different scenarios.

typescript tutorial about TypeScript - Understanding Decorators

TypeScript - Understanding Decorators

3:23 typescript PRO

Decorators are a feature of TypeScript that are becoming more and more common in many major libraries. This lesson walks you through what decorators are and how to create your own.

typescript tutorial about Compiling TypeScript with WebStorm

Compiling TypeScript with WebStorm

1:31 typescript PRO

As long as you have a properly configured .tsconfig, most tooling can just run tsc behind the scenes to build your project. This lesson shows how WebStorm includes a nice interface for reporting and navigating to the errors and will continuously run your TypeScript build for you.

typescript tutorial about Installing TypeScript and Running the TypeScript Compiler (tsc)

Installing TypeScript and Running the TypeScript Compiler (tsc)

1:59 typescript

This lesson shows you how to install TypeScript and run the TypeScript compiler against a .ts file from the command line.

typescript tutorial about TypeScript - Using Typings and Loading From node_modules

TypeScript - Using Typings and Loading From node_modules

4:44 typescript PRO

Using TypeScript when installing packages from npm often requires you to install related definition files. This lesson shows you how to use typings to install es6-shim then how to configure SystemJS to load from node_modules.

typescript tutorial about TypeScript - Reflection and Decorator Metadata

TypeScript - Reflection and Decorator Metadata

5:59 typescript PRO

TypeScript allows you to emit decorator metadata which enables more powerful features through reflection. This lesson show you how decorators and reflection fit together and how to configure your own decorators to use reflection.

typescript tutorial about Using Lodash in TypeScript with Typings and SystemJS

Using Lodash in TypeScript with Typings and SystemJS

3:38 typescript PRO

One of the most confusing parts of getting started with TypeScript is figuring out how to use all the libraries that you know and love from JavaScript. This lesson walks you through including Lodash in your project, installing Lodash definition files, and then properly loading Lodash with SystemJS.

typescript tutorial about TypeScript - Using Exclude and RootDir until File Globs Lands in 2.0.

TypeScript - Using Exclude and RootDir until File Globs Lands in 2.0.

1:48 typescript PRO

Files globs will be available in TypeScript 2.0, so in the meantime, we need to use "exclude" and "rootDir" to configure which files to load. This lesson shows how to switch from "files" to "exclude".

typescript tutorial about Stopping a TypeScript Build When Errors Are Found

Stopping a TypeScript Build When Errors Are Found

0:58 typescript PRO

TypeScript will always compile even if there are ridiculous errors in your project. This lesson shows how to configure your .tsconfig with "noEmitOnError" so that no files are output if tsc reports an error.

typescript tutorial about TypeScript - What Happens to Compiled Interfaces

TypeScript - What Happens to Compiled Interfaces

3:14 typescript PRO

This lesson covers using your first TypeScript Interface and what happens to the Interface when it is compiled down to JavaScript.

typescript tutorial about Configuring TypeScript Which Files to Compile with "Files" and "OutDir"

Configuring TypeScript Which Files to Compile with "Files" and "OutDir"

1:24 typescript PRO

This lesson shows how to configure the .tsconfig so you only compile the .ts files you want. It then shows how to configure which directory you'd like to compile the files to using "outDir".

typescript tutorial about Configuring a New TypeScript Project

Configuring a New TypeScript Project

0:52 typescript

This lesson walks you through creating your first .tsconfig configuration file which will tell the TypeScript compiler how to treat your .ts files.

typescript tutorial about Loading Compiled TypeScript Files in Browser with SystemJS

Loading Compiled TypeScript Files in Browser with SystemJS

5:00 typescript PRO

TypeScript outputs JavaScript, but what are you supposed to do with it? This lesson shows how to take the output and use SystemJS as the module loader so that you can use the files in your browser.

typescript tutorial about Understanding Generics with RxJS

Understanding Generics with RxJS

7:12 typescript PRO

Libraries such as RxJS use generics heavily in their definition files to describe how types flow through different interfaces and function calls. We can provide our own type information when we create Observables to enable all of the auto-complete & type-safety features that you would expect from Typescript. This can be achieved with minimal annotations thanks to the power of generics.

typescript tutorial about Introduction to Generics in Typescript

Introduction to Generics in Typescript

3:22 typescript PRO

If Typescript is the first language in which you've encountered generics, the concept can be quite difficult to understand. We skip the lecture in this lesson and dive straight into a real-world use-case that is guaranteed to help you understand the need for generics.

typescript tutorial about Typescript Enums vs Booleans when Handling State

Typescript Enums vs Booleans when Handling State

3:49 typescript PRO

Handling state with Typescript enums, instead of booleans, is preferred because:
- Enums are more readable
- Enums can have as many states as you need while booleans only have 2
- You only need to keep track of state with 1 variable when using enums

typescript tutorial about TypeScript Up and Running in Seconds

TypeScript Up and Running in Seconds

0:51 typescript PRO

It’s easy to get up and running with TypeScript, a strongly-typed superset of JavaScript. We’ll cover:
- installing the compiler with Node.js
- compiling TypeScript to JavaScript
- auto-watching source files for changes
- fixing code errors found by TypeScript

typescript tutorial about Catching JavaScript Mistakes with TypeScript

Catching JavaScript Mistakes with TypeScript

5:13 typescript PRO

The TypeScript compiler is a powerful tool which catches mistakes even in vanilla JavaScript. Try it online at the TypeScript Playground, zero setup required.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?