I have a similar project ongoing and had exactly the same need. The solution is easy: create a typings file for your app and put it into node_modules/@type/<yourid>
. If you don't know about typings files read up on the Definitely Typed page. On the welcome page there's another way to reference a typings file, if you don't have a node.js structure:
/// <reference path="<path>/yourtypes.d.ts" />
The typings file also works for plain JS code, if you give vscode some hints via type annotations. That looks like:
/** @type {yourmodule.yourtype} */
var value; // Will be considered as being of type `yourtype`.
With that in place vscode will then show members for value
in the code completion list.