Book Image

TypeScript High Performance

By : Ajinkya Kher
Book Image

TypeScript High Performance

By: Ajinkya Kher

Overview of this book

<p>In a world where a tiny decrease in frames per second impacts customer engagement greatly, writing highly scalable code is more of a necessity than a luxury. Using TypeScript you get type checking during development. This gives you the power to write optimized code quickly. This book is also a solid tool to those who’re curious to understand the impact of performance in production, and it is of the greatest aid to the proactive developers who like to be cognizant of and avoid the classic pitfalls while coding.</p> <p>The book will starts with explaining the efficient implementation of basic data Structures, data types, and flow control. You will then learn efficient use of advanced language constructs and asynchronous programming. Further, you'll learn different configurations available with TSLint to improve code quality and performance. Next, we'll introduce you to the concepts of profiling and then we deep dive into profiling JS with several tools such as firebug, chrome, fiddler. Finally, you'll learn techniques to build and deploy real world large scale TypeScript applications.</p>
Table of Contents (17 chapters)
Title Page
Credits
Foreword
About the Author
Acknowlegement
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
7
Profile Deployed JS with Developer Tools and Fiddler

Chapter 3. Efficient Usage of Advanced Language Constructs

In this chapter, we will go over the several different language constructs in TypeScript latest up to TypeScript 2.1. We will look at the right way of leveraging these constructs in a bug-free and efficient manner. In the process, we will cover the nitty-gritties associated with each construct and expose some of the common errors developers make.

We will begin with an introduction to the construct and proceed with its usage in a close to real-world scenario and explore how each of these constructs can lend themselves to writing scalable, modular, and highly efficient code.

We will explore the following topics in this chapter:

  • Arrow functions: We will take a look at arrow functions, also referred to as Lambda functions, and understand their close relation with the this keyword and scope in general.
  • Mixins: We will explore mixins, which are a way to combine reusable components or classes to build an aggregated, larger component. We will...