jsdoc / jsdoc/jsdoc

Show inherited methods in extended module

Open
#1,447 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
15.5k
Forks
1.5k
Avg merge
10d 23h
Merged PRs (30d)
1

Description

I'm trying to use @extends but it seems this only marks an item as extending another, it doesn't actually seem to then inherit its public properties.

It would be nice if when extending another module the module that does the extending shows the methods that it inherited from the parent.

So take the following example:

/**
 * @module: foo
 */
(function()
{

    /**
     * @name bar
     * @method
     */
    this.bar = function()
    {
        console.log("foobar");
    }

}).apply(module.exports);

/**
 * @module foobar
 * @extends module:foo
 */
(function() 
{

    // ..

}).apply(module.exports);

Now when I generate the documentation for "foobar" the foobar documentation page should show the method "bar". At the moment the documentation page just tells you that it is extending module:bar.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how @extends is handled when generating module documentation, using the foo and foobar example in the issue. Confirm the current output, then verify that foobar displays the inherited public method bar while retaining its parent-module relationship.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.