Transpiling

Learn TypeScript and transpile code into JavaScript for JS-only environments, and understand the fundamentals of the transpilation process.

"Hello TypeScript"

When we run a TypeScript file, the TypeScript compiler is responsible for transpiling it into a corresponding JavaScript file. This process is known as transpiling, allowing us to run our TypeScript code in environments that only support JavaScript, such as a web browser or a Node server.

You might be wondering, where is this JavaScript file that’s being generated? We won’t see it in the code editor—it’s happening behind the scenes. But don’t worry; we’ll take a closer look at the transpiling process in a moment.

For now, let’s just run this simple Hello TypeScript program and see what happens. Go ahead and press the “Run” button to see the output of the following code.

Create a free account to view this lesson.

Continue your learning journey with a 14-day free trial.

By signing up, you agree to Educative's Terms of Service and Privacy Policy