'VS Code/JS/TS: fold the class methods only

In VS Code, is there a way to fold/unfold only the class methods found in the file?

I'm aware of Collapse all methods in Visual Studio Code but Ctrl + K + 2, or 3 only deal with the code block level and not the semantics of whether it's a method or not.



Solution 1:[1]

Wouldn't you know it... Just found an extension that does exactly that. Fold To Definitions by Zeev Rotshtein

https://marketplace.visualstudio.com/items?itemName=zeevro.fold-to-definitions

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 sw1337