1 Understanding TypeScript

 

This chapter covers

  • Understanding the TypeScript developer features
  • Deciding when to use TypeScript in a project
  • Recognizing the limitations of TypeScript
  • Understanding the contents of this book
  • Reporting errors in this book
  • Contacting the author

TypeScript is a superset of the JavaScript language that focuses on producing safe and predictable code that can be executed by any JavaScript runtime. Its headline feature is static typing, which makes working with JavaScript more predictable for programmers familiar with languages such as C# and Java. In this book, I explain what TypeScript does and describe the different features it provides.

1.1 Should you use TypeScript?

TypeScript isn’t the solution to every problem, and it is important to know when you should use TypeScript and when it will simply get in the way. In the sections that follow, I describe the high-level features that TypeScript provides and the situations in which they can be helpful.

1.1.1 Understanding the TypeScript developer productivity features

TypeScript’s headline features are focused on developer productivity, especially through the use of static types, which help make the JavaScript type system easier to work with. Other productivity features, such as access control keywords and a concise class constructor syntax, help prevent common coding errors.

1.1.2 Understanding the JavaScript version features

1.2 What do you need to know?

1.3 How do you set up your development environment?

1.4 What Is the structure of this book?

1.5 Are there lots of examples?

1.6 Where can you get the example code?

1.7 What if you have problems following the examples?

1.7.1 What if you find an error in the book?

1.8 How do you contact the author?

1.9 What if you really enjoyed this book?

1.10 What if this book has made you angry?

Summary

sitemap