In this video Emmanuel Henri demonstrates how to compile TypeScript files and then adds scripts to automate the process in the file.
- [Instructor] Now that we're benefiting from using…typescript with our file extensions converted to the format,…we have a new problem.…If we run an application, our project will crash.…We need a way to automate the process of properly compiling…our project and then run it.…And, I'd like to have all this scripted…with our MPN start command.…So let's take a look at this.…So the first thing we'll need to do is install a few things.…So what I want to install first and lets do an npm install…or I is ts node and we'll install it globally.…
So the ts node will allow us to run the project…with typescript so once we actually compile our code…from typescript to JavaScript, so we want something…that we'll be able to run the typescript compiled code…into JavaScript so ts node allows us to do that.…And, as you remember, we need to do sudo in these cases.…Once you have ts node installed, we need to install types…for typescript so node JS, express,…and a few other libraries actually created types…with their own libraries.…
Released
12/5/2018- TypeScript file conventions
- Using types in Node.js
- Adding types in your functions
- Using TypeScript classes in Node.js
- Using an interface in Node.js
- Using tools to organize your code
- Declaration merging
- Leveraging decorators in your Node.js application
Share this video
Embed this video
Video: Compiling and automation, part 1