Using VS Code Intellisense can greatly enhance productivity when working with internal project files, providing helpful autocompletion features and utilizing written JSDoc comments.
However, my current projects involve custom JavaScript libraries stored in Bitbucket Cloud repositories as ES6 modules, which are accessed via NPM or Yarn dependencies.
Despite knowing that JSDoc is available in these libraries, I have been unable to make use of Intellisense for them.
I attempted to explicitly include the library files in the jsconfig.json file, but to no avail:
{
"compilerOptions": {
"target": "es2017",
"moduleResolution": "node",
"checkJs": true,
"allowSyntheticDefaultImports": true,
"noEmit": true,
"noImplicitAny": false,
"strictNullChecks": false,
"alwaysStrict": true,
"sourceMap": false
},
"include": ["src/**/*", "node_modules/my-lib/**/*"]
}
Is there a straightforward method to instruct VS Code to recognize my library files? While one solution could involve creating and publishing TypeScript definition files for each library, I believe there must be a simpler way for VS Code to handle my library JavaScript files just like it handles internal project files.