2 Your first TypeScript application
This chapter covers
- Preparing the tools required for TypeScript development
- Creating and configuring a TypeScript project
- Using the TypeScript compiler to generate pure JavaScript code
- Executing pure JavaScript code using the Node.js runtime
- Preparing a TypeScript project for use with ECMAScript modules
- Installing and using a third-party JavaScript package
- Using type declarations for a third-party JavaScript package
The best way to get started with TypeScript is to dive in. In this chapter, I take you through a simple development process to create an application that keeps track of to-do items. Later chapters show how TypeScript features work in detail, but a simple example will be enough to demonstrate how the basic TypeScript features work. Don’t worry if you don’t understand everything in this chapter. The idea is just to get an overall sense of how TypeScript works and how it fits into an application.
2.1 Getting ready for this book
Four packages are required to get ready for this book. Perform each installation described in the following sections and run the test provided for each of them to ensure that the packages work as they should.