js-doc-parse icon indicating copy to clipboard operation
js-doc-parse copied to clipboard

can't set summary/description for a module using exports

Open wkeese opened this issue 13 years ago • 2 comments

It's near-impossible to setup a summary/description for modules using "exports". For example see dojo/dom-attr.js.

I tried to hack it with by adding this to the end of the file, but it didn't work:

/*=====
var ret = {
    // summary:
    //      This module defines the core dojo DOM attributes API.
};
lang.mixin(ret, exports);
return ret;
=====*/

See also http://bugs.dojotoolkit.org/ticket/13769#comment:40, it's not trivial to remove the use of exports.

wkeese avatar Jun 17 '12 23:06 wkeese

Do you have any thoughts on the way this should be handled? It seems impossible with dojodoc. jsdoc could handle it just fine but we have no processor for that yet.

csnover avatar Jun 21 '12 04:06 csnover

I had one suggestion above but it's kind of yucky because the module is both using exports and returning a value.

This seems like a similar problem to NodeList-fx.js etc., where we need a summary/description on the module itself, which overrides whatever summary/description is attached to the return value.

wkeese avatar Jun 21 '12 05:06 wkeese