Introduction to TypeScript - what you have to know

Let's introduce TypeScript with some feature examples and configurations: how to compile TS files to JS files, work with classes / types / union types, functions, inheritance, and interfaces.

Compilation using Gulp

Gulp is a task runner available as an npm package. It provides a plugin to handle the TypeScript compilation. The only thing to do is to configure a task using gulp with gulp-typescript.

To download the gulp packages, you have to install Node.js (https://nodejs.org/) to get access to the npm packages:

  1. Install Gulp using the following command line:
        npm install gulp
  2. Install Gulp-Typescript using the following command lines:     
        npm install gulp-typescript
  3. To configure the Gulp task, just ...

Get Babylon.js Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.