How to get intellisense for third-party JavaScript libraries in VS Code

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • DefinitelyTyped

    The repository for high quality TypeScript type definitions.

  • Types for these packages are mostly sourced from the DefinitelyTyped GitHub repo.There are some other packages that follow this @types/<> naming convention. You can search for NPM packages that have type definitions using https://www.typescriptlang.org/dt/search?search=.

  • Visual Studio Code

    Visual Studio Code

  • One thing to note is that the type definitions don't provide intellisense inside script tags in your HTML file. There is an open issue requesting this feature.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • GreenSock-JS

    GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web

  • One drawback is that not all the packages are up-to-date. I found @types/gsap to be incomplete. It does not include a definition for the gsap object. The gsap npm package covers the entire API, and the function descriptions have more detail. So, you can install that as a dependency instead - npm install --save-dev gsap.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts