Book Image

TypeScript 3.0 Quick Start Guide

By : Patrick Desjardins
Book Image

TypeScript 3.0 Quick Start Guide

By: Patrick Desjardins

Overview of this book

<p>TypeScript is designed for the development of large applications and can be used to develop JavaScript applications for both client-side and server-side execution. This book is the ideal introduction to TypeScript, covering both the basics and the techniques you need to build your own applications.</p> <p>We start by setting up the environment and learning about the build tools that support TypeScript. Then we look at scoping of a variable, and the difference between a undefined variable and a null variable. You will then see the difference between an object, an Object, an object literal, and an object built with a constructor, crucial concepts in understanding TypeScript.</p> <p>You will learn how to make your code more generic to increase the reusability of your classes, functions, and structures, and to reduce the burden of duplicating code. We look at creating definition files to transform the actual JavaScript code to be compatible with TypeScript.</p> <p>By the end of the book, you will have worked with everything you need to develop stunning applications using TypeScript.</p>
Table of Contents (14 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Free Chapter
1
Getting Started with TypeScript
Index

Summary


In this chapter, we discussed many ways that generic information can be stored with the concept of many objects. We demystified the difference between the uppercase and lowercase object with an object literal and an instantiated object. We clarified two different structures to hold quick access data with index signature and map. The chapter continued with how to manipulate several types with a union and an intersection. Finally, we saw how to destruct, and how declare is different than the three previous declarations mentioned in Chapter 2, Onboarding Types with Primitive.

In the next chapter, we will see how to work with object-oriented. The next chapter covers how to use inheritance, encapsulation, and static function. The notions of interface and how to define a constructor signature in an interface will be explained. The next chapter dives into the powerful world of object-oriented in TypeScript.