Skip to content

this[property] gets recognized as class member in ESDoc. #59

@Rukenshia

Description

@Rukenshia

I sometimes manipulate properties of my class via this[property] = value. This however generates a public member 'property' in my ESDoc generated document:

class Foo {
  /**
   * Creates a new instance of Foo
   *
   * @constructor
   */
  constructor() {
    /** @type {string} */
    this.foo = 'bar';
  }

  /**
   * Set the given property in the class.
   *
   * @param {string} property property to set
   * @param {*} value new value
   */
  manipulate(property, value) {
    this[property] = value;
  }
}

Result

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions