Skip to content

Missing information for ES6 getters/setters #906

Open
@bmaupin

Description

@bmaupin
  • What version of documentation.js are you using?:
    5.3.1

  • How are you running documentation.js (on the CLI, Node.js API, Grunt, other?):
    CLI

I'm trying to document ES6 getters/setters. I couldn't find any documentation for documentationjs, but for jsdoc it seems that @type is the preferred syntax. For example:

Input:

/**
 * Game version.
 * @type {string}
 */
get gameVersion() {
  return this._getPropertyIfDefined('gameVersion');
}

Output:

### gameVersion

Game version.

I would have expected there to be some mention:

  1. That the property is of type string
  2. That this property is read-only (i.e. there's a getter but no setter)

Should I be using a different syntax?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions