Getting Started with TypeScript

TypeScript is a powerful, fun, and popular programming language used for building browser and NodeJS applications. This course will teach you all of the most important features of TypeScript, and quickly make you productive with the language.
Course info
Rating
(165)
Level
Beginner
Updated
May 18, 2017
Duration
3h 8m
Table of contents
Course Overview
Installing TypeScript and Configuring a Project
Taking Advantage of Built-in Types
Writing Better Functions with TypeScript
Creating and Using Custom Types
Creating and Consuming Modules
Being More Productive with Type Declaration Files
Description
Course info
Rating
(165)
Level
Beginner
Updated
May 18, 2017
Duration
3h 8m
Description

Creating great web applications requires great JavaScript code. TypeScript helps you create great JavaScript code. In this course, Getting Started with TypeScript, you'll learn how to create browser applications faster and with fewer errors using a powerful and fun programming language. First, you'll learn how to configure TypeScript projects. Next, you'll explore how to create and use your own types. Finally, you'll discover how to get strong typing support for just about any JavaScript library you can imagine. When you're finished with this course, you'll have a foundational understanding of TypeScript's most important features, as well as the skills you need to begin building client-side web applications and NodeJS applications with TypeScript.

About the author
About the author

Brice has been a professional developer for over 20 years and loves to experiment with new tools and technologies. Web development and native iOS apps currently occupy most of his time.

More from the author
RxJS: Getting Started
Intermediate
3h 4m
27 Sep 2018
Web Development: Executive Briefing
Beginner
30m
31 Jul 2018
Angular HTTP Communication
Intermediate
2h 27m
9 Mar 2018
More courses by Brice Wilson
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hey everybody. My name is Brice Wilson and welcome to my course, Getting Started with Typescript. I'm a server and client-side web developer. Typescript's popularity is exploding and for lots of good reasons. It's a super set of JavaScript that helps you write better code faster and it compiles to JavaScript that will run in Node. js or any modern web browser. In this course, we are going to cover all of the basic typescript topics to quickly make you productive with the language. Some of the major topics that we will cover include; Configuring a TypeScript project, using types with functions, Classes and interfaces, modules, and type declaration files. By the end of this course, you'll know how to use all of the most important features of the language and be ready to begin your first TypeScript project. Before beginning this course, You should be familiar in the basics in JavaScript, but you certainly don't need to be an expert. I'll hope you'll join me on this journey to learn TypeScript with the Getting Started with Typescript course at Pluralsight.

Installing TypeScript and Configuring a Project
Hi. This is Brice Wilson. Welcome to Getting Started with TypeScript. In this course I'll teach you everything you need to know to quickly be productive in this modern and mature language. I love TypeScript. It compiles to standard JavaScript and can be used to build client-side browser applications, server-side node applications, as well as any other application that you could otherwise build using JavaScript. The strong typing support, along with the many other advanced features in TypeScript help you build applications with fewer errors that are also more maintainable and easier to refactor. In this first module of the course I'll quickly give you an overview of the entire course and the topics I'll be covering. I'll also show you the MultiMath demo app I'll be using. It's a very simple math game for kids that we'll build throughout the course. After that quick overview we'll dive in and get started building the app. I'll show you how to install TypeScript using npm and how to run the compiler from the command line. I'll also show you how to configure a new TypeScript project with a special file named tsconfig. json. There's lots of important topics to cover, so let's get started.

Taking Advantage of Built-in Types
Hey everybody. Welcome back. It's now time to dive into some TypeScript syntax and begin experimenting with some of the languages built-in types. In this module we'll look at some of the primitive data types available in TypeScript. I'll also hopefully convince you to set aside the var keyword you may have used in JavaScript and now declare all of your variables with let or const. While I'm declaring those variables I'll also show you how to apply type annotations to them. Null and undefined have been a source of bugs for JavaScript developers for years. I'll show you how TypeScript allows you to manage them much more effectively, and I'll wrap up the module with a look at control flow-based type analysis, which I think is one of Typescript's most impressive features. There's lots to cover. Let's start with a look at some of the basic types available in TypeScript.

Writing Better Functions with TypeScript
Hey everybody. Functions are the building blocks of any application written in JavaScript or TypeScript. In this module I'm going to show you the features in TypeScript that help you create better functions that are easier to use and more fun to write. Because this is TypeScript I'm going to start out by showing you how you can add type annotations to your functions. Adding annotations to functions gives you all of the same benefits as adding annotations to variables, but they also make your functions easier to use. We'll then see how to write arrow functions in TypeScript. They're an alternative function definition syntax that's commonly used when writing anonymous functions. I'll wrap up this module by demonstrating how functions themselves have a type defined by their signature, and how you can take advantage of that in your code. Let's first see how to spice up a boring function by adding type annotations to it.

Creating and Using Custom Types
Hi. This is Brice Wilson. So far in this course I've shown you lots of ways to use the built-in TypeScript types that help you write better code with fewer errors. It turns out that you can get all of the same great type checking support with your own custom types as well. Object oriented developers should feel right at home with the topics in this module, but don't worry if it's all new to you. I'll cover everything you need to know. Creating your own custom types is really all about two TypeScript language features, interfaces and classes. It's only two features, but they're really big features. I'll first explain the differences between the two and when you might use one over the other. I'll then get into the details and show you how to create and use them in your apps. Along the way we'll take a brief detour as I show you how to configure TypeScript projects to support multiple source files, but let's start by looking at the differences in classes and interfaces.

Creating and Consuming Modules
Hey everybody. Welcome back. In this course module I'm going to cover TypeScript modules. TypeScript adopted the very straightforward ES2015 module syntax, and I'll show you how to use it, along with some features specific to TypeScript that will help you create and consume modules in your applications. I'll start off with a brief explanation of why you might want to use modules in TypeScript. Since not all browsers natively support modules yet I'll also quickly go over some of the supporting technologies you may have to employ in order to use your TypeScript modules in a browser application. I'll then cover the syntax you use to import and export modules and wrap up with an explanation of how TypeScript resolves the location of the modules you import.

Being More Productive with Type Declaration Files
Welcome back. In this short final module of the course I'm going to cover type declaration files and show you how they allow you to take advantage of thousands of existing JavaScript libraries in your TypeScript projects, and help you write better code faster. This module will be all about type declaration files, but I hope to answer three important questions you likely have about them. What are they, where do I get them, and how do I use them? Let's start with what they are.