Is it possible to tell jsdoc to look in a file separately from the source code to document this code?

I would like to leave brief comments as short as possible, since my experience is that comments over 3 or 4 lines tend to obscure, creating a lot of unnecessary “read manual lines”.

I need the legacy to adhere to a jsdoc-compatible format for documenting code. This requires that many obvious things be declared explicitly if they need to be documented correctly. Almost every tag can fall into this category. Even those that don’t do this are often useless to a working developer.

My vision is to have a quick digest inside the code itself, which the developers will actually read, but link to a separate file (or even a comment dump in the same file, separate from where the developers will work) for additional marking, for example:

/**
 *  Used when making an example of the argument.
 *  @include someotherplace
 */
function example(argument) { stuff;}

...lots more code...

/**
 *  someotherplace
 *  @param argument The victim
 *  @since forever
 *  @other stuff
 */

Another tool or plugin would be acceptable, I really only followed the syntax. Another alternative would be a tool with some really good implicit documentation creation.

+5
source share
2 answers

With jsdoc3, I don’t think there is a way to get the perfect one without having to write a new plugin. (I do not know a plugin that would already do this.)

, jsdoc, -, , .

/**
 * @module foo
 */


/**
 * Used when making an example of the argument.
 * @see {module:foo.example_type}
 */
function example(argument) {
    //...
}

/**
 * someotherplace
 * @typedef {function} module:foo.example_type
 * @param argument The victim
 * @since forever
 */

, @see . @module module: , , . , .

+1

{@link} {@tutorial}? :

{@tutorial}

API-, , , ,

{@link} HTML - .

:

@anyTag This is some text {@link otherSymbol}.
0

All Articles