1

I've been trying to use JsDoc for documenting my javascript but I keep coming across this hurdle. It keeps saying "nothing to document, exiting"

Here is the peice of code I'm trying to document:

/**
 * Container for all editing methods
 * @namespace
 */
var FREdit = {

    /**
     * Toggle value for editing
     * @type Number
     */
    isToggleOn:0,

    /**
     * Initialize editing 
     */
    init: function(){
        this.initPopups();
    },

    /**
     * Function to enable editing 
     */
    enable: function(){
        this.enableTitles();
            this.isToggleOn = 1;
    }
};

Above I'm using namespace. Even if I use a variant form of function definition in JavaScript, JSDoc doesn't seem to recognise it. Eg:

/**
 * Just any function
 */
var any_function = function(){

};

Any idea how to get around this? Thanks!

1 Answer 1

1

Judging from your question I'm guessing you're using JSDoc. The original JSDoc has been unsupported for a while now.

I suggest you use jsdoc-toolkit as it has much better support. According to their documentation you can document the class pattern. Take a look at their examples and you should be good to go!

Cheers!

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! I found jsdoc-toolkit after posting this and it works perfectly fine!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.