Skip to content

Distinction between class properties (getters/setters) and methods #246

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

Closed
skeate opened this issue Nov 15, 2015 · 1 comment
Closed

Distinction between class properties (getters/setters) and methods #246

skeate opened this issue Nov 15, 2015 · 1 comment

Comments

@skeate
Copy link

skeate commented Nov 15, 2015

For (highly simplified) example,

class A {
  get b() {
    return 0;
  }

  c() {
    return 1;
  }
}

let a = new A();
console.log( a.b, a.c() ); // logs 0 1

But in the generated documentation there doesn't really seem to be a way to tell that b doesn't need parentheses while c does.

Any advice?

@tmcw
Copy link
Member

tmcw commented Nov 15, 2015

Good point: should getter/setters be documented as properties rather than functions?

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