In Javascript for some methods, I don't see the suggestions. For example indexOf, charCodeAt and so on. Is it possible to activate suggestions for these built-in Javascript keywords?
1 Answer
I think you should leverage VS Code ability to work with JSDoc.
As you can see without JSDoc, VS Code can't infer that bar is a string. After documenting the parameter properly, it is able to make some meaningful suggestions:
2 Comments
JDunken
For those that are wondering, this works for variables that are utilized inside of a function, like in the example, but does not work for variable declarations like
const foo = bar.[intellisense-here]customcommander
@JDunken it can if you add the relevant bit of JSDoc to your variable declaration. e.g.
/** @type {string} */ var foo;
