Skip to content

Missing information for ES6 getters/setters #906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bmaupin opened this issue Sep 11, 2017 · 1 comment
Open

Missing information for ES6 getters/setters #906

bmaupin opened this issue Sep 11, 2017 · 1 comment

Comments

@bmaupin
Copy link

bmaupin commented Sep 11, 2017

  • 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!

@timdp
Copy link
Contributor

timdp commented Feb 27, 2018

It seems like @type isn't supported and the closest thing I could find in the docs is to basically duplicate the documentation for the getter and the setter, but with a different signature. That's a bit verbose and error-prone.

Any update? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants