Skip to content


Also use context.receiver to assign methods and properties #77

wants to merge 1 commit into from

3 participants


Hey @redmunds, @lkcampbell, this is a possible fix for #74. We were missing the receiver object, so we weren't pushing those properties and methods to the appropriate object.

Great catch! Thanks!


@jbalsas I verified that the static methods are now showing up, but they are not distinguished from the instance methods in the API Docs. What about adding a static label for those?

@lkcampbell What do you think?


@redmunds, that sounds fine to me. My first concern is just getting the missing doc comments in there but it would also be nice to format them slightly different as well.

One idea would be to create a new section, before or after the Methods section, called Static Methods or Class Methods. Put the documentation for the methods in that new section. But if that is excessive, a static label would suffice.


Yes, a separate section is even better.


Hi @redmunds, @lkcampbell

I'm a bit short on time these days, but still wanted to give this a go... I've created a new PR #80

The simplest fix for now is adding the STATIC modifier to those properties and methods. I didn't want to mess with the templates with so little time to double-check everything.

Could you please take a loot at the new PR? If you're okay with it, I can merge it and publish a new version so you can create the docs for 0.42

@jbalsas jbalsas closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/language/js/ModuleParser.js
9 lib/language/js/ModuleParser.js
@@ -107,6 +107,7 @@
var context = comment.ctx;
if (context) {
+ var receiver = context.receiver || context.constructor;
if (context.type === "declaration") {
@@ -127,11 +128,11 @@
- } else if (context.type === "method" && module.classes[context.constructor]) {
- module.classes[context.constructor].methods.push(comment);
+ } else if (context.type === "method" && module.classes[receiver]) {
+ module.classes[receiver].methods.push(comment);
- } else if (context.type === "property" && module.classes[context.constructor]) {
- module.classes[context.constructor].properties.push(comment);
+ } else if (context.type === "property" && module.classes[receiver]) {
+ module.classes[receiver].properties.push(comment);
} else {
Something went wrong with that request. Please try again.