'How to hide properties and methods with an underscore in VSCode Intellisense?

I develop in Javascript with VSCode, and I don't want Intellisense to show class properties and methods which are private (i.e. with an underscore).

Is this possible, and if so how?



Solution 1:[1]

This is currently not supported by VSCode's built-in JavaScript language features.

For TypeScript code, you can use the private modifier, but for JavaScript, there is no story for marking a property as private. I've opened an issue against the TypeScript project to track observing the the @private jsdoc annotation as a starting point: https://github.com/Microsoft/TypeScript/issues/14009

If you would like a more generic solution that marks all properties starting with _ as private, please fill out a feature request: https://github.com/Microsoft/vscode/issues/new

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Matt Bierner