Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I document dynamic generated methods? Is name tag supported? #225

Open
DigitalBrainJS opened this issue Oct 12, 2020 · 2 comments
Open
Labels

Comments

@DigitalBrainJS
Copy link

I'm trying to document a dynamic generated method, so I use name tag for this, but it doesn't generate any namepaths/documentation.

class Animal{
    /**
     * Creates a new animal instance
     */
    constructor() {
    }

    /**
     * foo method
     */
    foo(){}

    /**
     * @name Animal#bar
     * @function
     * @memberof Animal
     * @description test
     * @param {number} x
     * @returns {boolean}
     */
}

jsdoc2md --namepaths index.js

{
  "module": [],
  "class": [
    "Animal"
  ],
  "constructor": [
    "Animal"
  ],
  "mixin": [],
  "member": [],
  "namespace": [],
  "constant": [],
  "function": [
    "Animal#foo" // Animal#bar is missing
  ],
  "event": [],
  "typedef": [],
  "external": []
}

But my IDE recognizes the method correctly:
image

@75lb
Copy link
Member

75lb commented Feb 26, 2021

Hi, does this work as expected when generating docs directly using jsdoc?

@75lb
Copy link
Member

75lb commented Feb 28, 2021

Also, make sure you have a @module defined at the top: read this

@75lb 75lb added the question label Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants