Book Image

TypeScript Essentials

By : Christopher Nance
Book Image

TypeScript Essentials

By: Christopher Nance

Overview of this book

Table of Contents (15 chapters)

Generating a single output file


In the original version of our drawing application, we only had six files to download to the client browser: a single CSS file, our app.js file, and the files containing our object types. Each file is a separate web request and all of the files must be loaded before our application can run.

This is a relatively speedy process, and on average takes less than 100 ms depending on network latency. However, in our quest to create a large-scale maintainable application, the number of code files we have has exploded. We now have more than 20 files that need to be loaded into the client browser before the application will successfully complete all of its functionality. This has caused our load times to more than double from what they previously were as shown in the following screenshot of the network traffic:

This delay in load time is perfectly acceptable for development purposes (in fact, as we will see in the next chapter, it will actually be preferable). However...