onury/docma

Strange parsing issue(?)

takase1121 opened this issue · 5 comments

I have this file structure.
image
However when I generate the docs the tree became like this instead
image
(.parse is a static method in DocLoader)

onury commented

JSDoc does not care about the file structure. It's about class/namespace hierarchy.
Docma tree outline shows that the hierarchy is not correctly documented with JSDoc.

Make sure your parse() function is a child of DocLoader.
One way is this:

/**
 *  Some description...
 *  @name DocLoader.parse
 *  @function
 */
parse() { 
 // ...
}

or you could use @memberof
..

Pls consult JSDoc documentation.

none of your suggestion worked. Here is a snippet of code I had.

export class DocLoader {
    /**
     * Parses a file
     * @param {string} filename The filename to parse
     */
    static async parse(filename) {
        ...
    }
}

I really can't find out where's the issue

onury commented

It seems you didn't document DocLoader.

How do I do that?

Thanks for your help. Apparently I just have to document the classes with @class tag now it works fine.