Open khizarnaeem opened 8 years ago
Specifically support for class methods would be appreciated.
+1
+1
+1
@wassname thanks for those sir, will be helpful in the meantime
+1 for ES6 support
How we can implement a solution for this?
+1
FYI: Version 0.8.0 adds support for ES2015 arrow functions
+1
I took all ES2015 features that affect docblockr from this ES2015 feature list:
+1 really annoying not getting ES6 class method blocks.
+1
+1
+1
+1
+1 Hello. I copied the pattern from java and included in the file /lib/languages/javascript.js This could be useful:
var classMethodRegex = xregexp(
// Method name
'(?P<name1>' + this.settings.fnIdentifier + ')\\s*' +
// Params
'\\((?P<args>.*?)\\)\\s*' +
// # Throws ,
'(?:throws\\s*(?P<throwed>[a-zA-Z_$0-9\\.,\\s]*))?'
);
Then
var matches = functionMatches || arrowFunctionMatches || classMethodMatches;
And voila. But i'm sure there is a better way to achieve this.
+1 😄
+1
Since most of the people commenting here seem to be most interested in support for shorthand method definitions: version v0.9.2
now supports this (again).
Just upgrade it .. It will work like a charm . My current version is 0.11.0
.
Any plans for JS ES6 support?