ibm-js / jsdoc-amddcl

An effort to create a JSDoc template that works well with AMD and C3MRO-based multiple class inheritance.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for abstract classes

AdrianVasiliu opened this issue · comments

We need a way to handle in the API doc "abstract classes" (as opposed to "concrete classes" and "mixins"). Currently, the IBM-JS JSDoc guidelines indicate to use @abstract on abstract classes, but currently the output of jsdoc-amddcl for

/**
 * A sample abstract class.
 * @class module:sampleframework/AbstractClass
 * @abstract
 */

is the following:

image

The troubles with this output:

  • It contains an automatically generated code example which is inappropriate for abstract classes.
    • Using @mixin instead of @abstract does has the effect of suppressing the code example, but we can't go this way because the output would contain the term "mixin":

image

  • (Minor) It does NOT contain the <abstract> keyword (more exactly, it contains it at the wrong place, that is inside the generated code example, as it can be seen in the above screenshot).

Both issues hold for the amddcl template as well as for the default jsdoc3 template.

On the other side, http://usejsdoc.org/tags-abstract.html only implies the use of @abstract for class members, not for classes. So at the basis it seems jsdoc doesn't have anything matching our concept of "abstract class".

This raises the questions:

  • Should/could be introduced support for @abstract on classes in jsdoc-amddcl?
  • In case we should/could not, how should we proceed for documenting our "abstract classes"?

Great, thanks Akira!