TypeScript in The Build Process 9 exercises
Problem

Convert a TypeScript File into a JavaScript File

In order to convert TypeScript files into JavaScript files, you need to use the TypeScript CLI.

Challenge

First, you'll need to make sure you've installed the TypeScript CLI globally.

Then, inside of the 011-compile-typescript-to-javascript.problem directory, you will need to create a `tscon

Loading exercise

Transcript

00:00 TypeScript gives us a way that we can automatically turn our TypeScript files into JavaScript files. We're writing code here in the TypeScript language, but what we need is the TypeScript CLI in order to basically turn this into a JavaScript file. So what we want to do in order to complete this exercise,

00:17 I would like you to go into this folder inside here, into 011, and then we need to basically initiate a TypeScript project inside here. We're going to need to install the TypeScript CLI globally.

00:32 Then we're going to need to essentially say, right, let's initiate a TypeScript config inside here. Then we're going to use that TypeScript config and the TypeScript CLI to turn this TypeScript file into a JavaScript file. There are a few steps to set up here.

00:48 So if you just want to watch me do it, then feel free to go ahead to the solution. But I've also given you a little list of things you can do inside this readme here. Set up a tsconfig.json, run the TypeScript compiler, change the index.html file to use the JavaScript file that then gets created. Good luck.