Introduction to TypeScript

In this introductory lesson on Typescript we provide a quick overview of what Typescript is, why you should learn this powerful language, the difficulty of learning Typescript and some prerequisites for this tutorial course.

If you're new to TypeScript, or programming in general, start from the beginning.

What is Typescript

TypeScript is a strongly typed superset of Javascript that compiles to plain Javascript. It’s designed for large-scale Javascript application development and cotains all the elements of Javascript.

TypeScript is the ES6 and up (ES2019, ESNext etc.) version of Javascript with additional features, developed and maintained by Microsoft under the Apache 2 license.

TypeScript cannot run directly in the browser, instead the TypeScript code we write gets compiled into Javascript code, which can run directly in the browser. Any valid .js file can be renamed to .ts and compiled with other TypeScript files.

Why learn Typescript

TypeScript provides us with a number of benefits beyond Javascript.

  • TypeScript is simple, fast, and easy to learn.
  • TypeScript supports all Javascript libraries.
  • TypeScript is a safer approach to JavaScript.
  • TypeScript is portable, it can run on any environment Javascript runs on. It doesn’t need a VM or specific runtime environment.
  • TypeScript is statically typed, therefore code written in TypeScript is more predictable, and is generally easier to debug.
  • TypeScript supports OOP features like classes, inheritance, interfaces, generics etc.
  • TypeScript provides compile time error-checking.
  • TypeScript tooling provides autocompletion, type checking and source code documentation.

Is Typescript hard to learn

If you have experience with other typed languages like C# , Java , or Go , then TypeScript will be quite easy to learn.

Javascript developers will have to overcome the type hurdle initially, but other than that it will be not be hard.

Prerequisites

Before we proceed, please note that we make the following assumptions:

  • You know how to install software on whichever operating system you use.
  • You can create and navigate directories and files on your computer.

While this tutorial course is for beginners with no knowledge of TypeScript or programming in general, programmers coming from other languages that want to learn TypeScript may also find it very helpful.

This tutorial course covers many topics of programming in TypeScript, ranging from beginner concepts to advanced.

TypeScript Crash Course in 45 minutes

If you prefer to learn visually, you can watch the full TypeScript Crash Course in 45 minutes.