Book Image

TypeScript Essentials

By : Christopher Nance
Book Image

TypeScript Essentials

By: Christopher Nance

Overview of this book

Table of Contents (15 chapters)

Controlling compiler output


The TypeScript compiler has a very robust set of features when it comes to controlling the final results of the compiler. The compiler is built in a scalable manner that allows us to compile multiple source files at once as well as controlling their output directory or path. We will also discuss creating source maps that help us when debugging our applications.

JavaScript output

Up until this point, we have only been working with compiling single TypeScript files at a time. As applications grow in size though, it is very important to separate our code into maintainable segments. When writing code for a C# application, it is common to separate code files by class. JavaScript conventions vary in how code is segmented. If following the module pattern, it is common to place an entire module in a single file; otherwise, code is usually segmented into related blocks as the application requires them. Passing multiple file names separated by spaces will tell the compiler...