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:
- Install Gulp using the following command line:
npm install gulp
- Install Gulp-Typescript using the following command lines:
npm install gulp-typescript
- To configure the Gulp task, just ...