Skip to content

Private class properties with the same name as public properties fail to be handled when both have jsdoc #242

@Standard8

Description

@Standard8

With this code:

class foo {
  /**
   * My doc
   */
  #bar = [];

  /**
   * My other doc.
   * @param {array} values
   */
  set bar(values) {
    this.#bar = values;
  }

sphinx-js fails with:

sphinx_js.suffix_tree.PathsTaken: Your code contains multiple documented objects at each of these paths:

  ./myfile.foo#bar

We won't know which one you're talking about.

If I change the name of the setter or the private variable, then sphinx-js works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions