2

I'm trying to document functions inside a specific module pattern with jsdoc-toolkit where the namespace is defined outside of the module. The functions that get attached to it are inside the immediate invoking function. What I get from the tool output is:

WARNING: Trying to document isObject as a member of undocumented symbol CORE.

Here is the simplified version of the code:

/**
 * @namespace The framework's top namespace
 * */
var FX = {
  /**
   * @namespace The core framework functions
   */
  core: {
  }
};

(function( CORE, GLOBAL ) {

    'use strict';

    var _isObject;

    CORE.isObject = _isObject = function( object ) {

        if (null === object || (void 0) === object) {
            return false
        }

        return true;

    };

    return CORE;

})(this.FX.core, this);  

1 Answer 1

2

You may try the @memberOf tag, which allows you to document what you consider the "parent" or container of an object to be.

/** 
 * @memberOf FX.core 
 */
CORE.isObject = _isObject = function( object ) {
    // ...
};
// ...

Syntax: @memberOf parentNamepath, parentNamepath is the namepath of the containing object.

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

2 Comments

I already figured that one out, still I'm waiting to see if there is some other solution
Accepting because it is only answer and probably will help some1 in a similar situation.

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.