6 Testing and debugging TypeScript

This chapter covers

  • Debugging TypeScript code using Visual Studio Code and the Node.js debugger
  • Using a linter to find problems in code the com piler won’t detect
  • Writing and executing unit tests on TypeScript code

In this chapter, I continue the theme of TypeScript development tools started in chapter 5, which introduced the TypeScript compiler. I show you the different ways that TypeScript code can be debugged, demonstrate the use of TypeScript and the linter, and explain how to set up unit testing for TypeScript code.

6.1 Preparing for this chapter

For this chapter, I continue using the tools project created in chapter 5. No changes are required for this chapter.

Tip You can download the example project ...

Get Essential TypeScript 5, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.