leonardocxavier / jsdoc-toolkit

Automatically exported from code.google.com/p/jsdoc-toolkit
0 stars 0 forks source link

@addon/@exec/@final #242

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In looking at jsdoc, I noticed that the following were missing in
jsdoc-toolkit: @addon, @base, @exec, @final.

I understand that @base has probably been avoided in favor of @augments
(though for compatibility, maybe it could be useful as a synonym), but it
seems the other items are potentially useful. Could these be added?

Thanks!

Original issue reported on code.google.com by bret...@gmail.com on 25 Aug 2009 at 10:47

GoogleCodeExporter commented 8 years ago

Original comment by micmath on 12 Sep 2009 at 6:30

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I think that this feature request really should've been broken into a separate 
request per tag since these tags don't really have any similar behaviors.  
Anyway....

@addon is an important one that I agree needs to be added ASAP. I 
override/extend 
the core JavaScript classes frequently (particularly Object and Function).

@exec I could live without, but wouldn't hurt to have available.

@base and @final already have equivalents (@augments and @constant, 
respectively), 
but could be nice for compatibility as mentioned.

Original comment by james.m....@gmail.com on 14 Sep 2009 at 7:06

GoogleCodeExporter commented 8 years ago
tag synonyms are controlled by a plugin, see:
http://code.google.com/p/jsdoc-toolkit/source/browse/tags/jsdoc_toolkit-2.3.2/js
doc-
toolkit/app/plugins/tagSynonyms.js

And it appears that @base is already a synonym for @augments, though I would 
say @base is deprecated 
which is why it isn't documented.

Regarding @addon, when adding members to a builtin like Object you can already 
do this:

/**
 * This is an addon function to SomeCoreClass which is
 * not defined within our own sources. 
 * @augments Object
 */
Object.someFunction = function(){ 
    // ...
}

For custom base classes that are defined elsewhere you can already do the 
following:

/**
 * Defined in an external library at foo.js
 * @name SomeCoreClass
 * @class
 */

/**
 * This is an addon function to SomeCoreClass. 
 */
SomeCoreClass.prototype.someFunction = function(){ 
    // ...
}

Is that sufficient?

Original comment by micmath on 19 Sep 2009 at 12:09

GoogleCodeExporter commented 8 years ago
I think that would be sufficient enough for me, but I can't speak for brettz9.
Also, looks like you didn't comment on @exec...?

Original comment by james.m....@gmail.com on 21 Sep 2009 at 1:39

GoogleCodeExporter commented 8 years ago
Just a quick apology--I'm very busy, and with health problems, I can't always 
comment
in a timely fashion, but I do intend to follow up here, and as suggested, on the
mailing list...Thanks...

Original comment by bret...@gmail.com on 21 Sep 2009 at 1:54

GoogleCodeExporter commented 8 years ago
The @exec tag was never formally added to the original JSDoc.pm project 
(support was only ever described as 
"experimental"), so I don't think it is reasonable to say that this is a tag 
that people depend on. In any case the 
JsDoc Toolkit project is much more extensible than the original project and 
there are already multiple places to 
add JavaScript code to be executed during the processing of your documentation: 
in custom plugins and in 
templates.

Original comment by micmath on 21 Sep 2009 at 6:56