From the course: TypeScript Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Importing third-party types

Importing third-party types - TypeScript Tutorial

From the course: TypeScript Essential Training

Importing third-party types

- [Instructor] In the previous video, I showed you how to use TypeScript to parse JavaScript files without actually converting them to full fledged TypeScript files. I also showed you how TypeScript found a few errors and I fixed most of those errors, but I left one, the one in which TypeScript warns me that it doesn't know what the dollar sign means, or rather, it's not aware of the jQuery library that I'm using here. Since TypeScript has been around for quite some time now, you'll probably find the majority of the JavaScript libraries you use will already have TypeScript support built in, especially if you're installing them from the NPM package repository. However, it is likely that at some point you will run across a library that doesn't offer TypeScript support, particularly if you are migrating an older application or one with a lot of custom code. In these cases, you've got two options. You can create the type…

Contents