DaGhostman / vscode-tree-view

VSCode extension that probvides mail symbol overview of the currently opened file
MIT License
29 stars 4 forks source link

[JS] Class - set/get, module.exports - not listed #105

Closed RedSparrowEU closed 5 years ago

RedSparrowEU commented 5 years ago

Hi,

Thank you for the extension. I find it very useful.

Do you thing is it possible to add support for set and get in the JS classes, that seem not to be listed in the tree.

What is not listed:

module.exports = class MyClass {}

  1. set/get -
class MyClass {
   constructor() {
      this.prop = 'Hello';
   }
   set prop(value) {
      this._prop = value;
   }
   get prop(){
      return this._prop;  
   }
}

Thank you, Greg

DaGhostman commented 5 years ago

Hey, thanks for the issue. I've made some changes to #103 and add accessors to TS/JS, but unfortunately the TS parser doesn't seem to pick up the modules.export syntax :disappointed: I will continue to look into that one, but recently work has kept me too occupied, so I can't really promise that I will manage to do it with this release

DaGhostman commented 5 years ago

as it turns out, there is no reliable way to extract module.exports from the typescript parsers so for now that is a no-go, although it is something I will try to address if I get enough time to do so