O'Reilly logo

Babylon.js Essentials by Julien Moreau-Mathis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required