15 Working with JavaScript
This chapter covers
- Adding pure JavaScript code to a TypeScript project
- Providing type definitions for JavaScript code
- Enabling type checking for JavaScript code
- Defining types for third-party packages
- Using publicly available type definitions
- Generating type declarations for use in other projects
TypeScript projects generally incorporate some amount of pure JavaScript code, either because the application is written in both TypeScript and JavaScript or because the project relies on third-party JavaScript packages installed using NPM. In this chapter, I describe the features that TypeScript provides for working with JavaScript. Table 15.1 summarizes the chapter.
Problem |
Solution ... |
---|
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.