jsdoc2md / jsdoc-to-markdown

Generate markdown documentation from jsdoc-annotated javascript
MIT License
1.69k stars 152 forks source link

Ignoring @typicalname on static members/methods #114

Closed Melatonin64 closed 7 years ago

Melatonin64 commented 7 years ago

Howdy!

@typicalname is a very useful feature, but I was wondering if there's a way to define a @typicalname for a class, and ignore it for static members/methods. Currently, the @typicalname will be used also for static members.

For example:

/**
 * @class MyClass
 * @typicalname instance
 */
function MyClass() {
    /**
     * @method MyClass#instanceMethod
     */
    this.instanceMethod = function() {
        console.log('I wanna document this as: instance.instanceMethod()');
    };
}

/**
 * @method MyClass.staticMethod
 */
MyClass.staticMethod = function() {
    console.log('I wanna document this as: MyClass.staticMethod()');
};
75lb commented 7 years ago

just to let you know, i have reproduced this and the fix is coming.

Melatonin64 commented 7 years ago

Thanks! I managed to work around it for now by overriding partials/helpers (added a custom @typicalinstancename functionality)...

75lb commented 7 years ago

Fixed and released in dmd@3.0.1, please update jsdoc2md.

Melatonin64 commented 7 years ago

Thanks, can confirm it's fixed.