Skip to content

Properties defined inside constructor function are not documented as class members #556

@chkt

Description

@chkt

First thanks to everybody working on this. This has great potential to become the very best javascript documentation generator out there.

When I define properties on this inside the constructor of a class, they get documented a properties of the global object.

/**
 * Does nothing
 */
export default class Foo {

    /**
     * Creates a new instance
     * @param {string} str
     */
    constructor(str) {
        /**
         * A useless property
         * @memberof Foo
         * @type {string}
         */
        this.bar = "";
    }

    ...
}

Removing @memberof does not change anything, the new property is still documented as belonging to the global scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions