point WebStrom to use correct Database class from JSDoc for coding assistance
If I use `@type {Database}`:
WebStorm thinks that this type is from this file:
However I want to use class definition from JSDoc from this file/library for coding assistance:
Is there any possibility to force WebStorm to do/use this?
Please sign in to leave a comment.
Try using
- this is the interface defined in node_modules/pg-promise/typescript/pg-promise.d.ts
IDatabase does not have methods, that I need. E.g.
they are defined in IBaseProtocol extended by IDatabase
In general - I can not force WebStorm to use "Database" class description from library, right?

And workaround IBaseProtocol - will not work. Looks like Webstorm does not use "typescript" suggestions inside ".js" file.
The same picture you will see with "IDatabase"
Try adding a namespace:
Ok. This workaround works! Thanks!