Skip to content

Infer private based on method name #436

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
arv opened this issue May 26, 2016 · 1 comment
Closed

Infer private based on method name #436

arv opened this issue May 26, 2016 · 1 comment

Comments

@arv
Copy link
Contributor

arv commented May 26, 2016

It is a common practice to infer private by naming your properties with a leading underscore.

It seems easy to add but I'm not sure it is something you would be interested in? If you are I would probably do a command line flag called infer-private that takes a string treated as a regexp.

@tmcw
Copy link
Member

tmcw commented May 26, 2016

Absolutely! I think this a reasonable default, too - definitely the majority of times I've seen the underscore prefix, it was used to indicate private-ness.

arv added a commit to arv/documentation that referenced this issue Jun 1, 2016
This adds a command line flag called `--infer-private` which is a
string (defaults to `^_`) which is used as a regexp for inferring
if a name is private or not.

For example:

```js
/** C */
class C {
  /** I'm public */
  m() {}
  /** I'm private */
  _p() {}
}
```

Fixes documentationjs#436
arv added a commit to arv/documentation that referenced this issue Jun 1, 2016
This adds a command line flag called `--infer-private` which is a
string (defaults to `^_`) which is used as a regexp for inferring
if a name is private or not.

For example:

```js
/** C */
class C {
  /** I'm public */
  m() {}
  /** I'm private */
  _p() {}
}
```

Fixes documentationjs#436
arv added a commit to arv/documentation that referenced this issue Jun 1, 2016
This adds a command line flag called `--infer-private` which is a
string (defaults to `^_`) which is used as a regexp for inferring
if a name is private or not.

For example:

```js
/** C */
class C {
  /** I'm public */
  m() {}
  /** I'm private */
  _p() {}
}
```

Fixes documentationjs#436
arv added a commit to arv/documentation that referenced this issue Jun 1, 2016
This adds a command line flag called `--infer-private` which is a
string (defaults to `^_`) which is used as a regexp for inferring
if a name is private or not.

For example:

```js
/** C */
class C {
  /** I'm public */
  m() {}
  /** I'm private */
  _p() {}
}
```

Fixes documentationjs#436
arv added a commit to arv/documentation that referenced this issue Jun 1, 2016
This adds a command line flag called `--infer-private` which is a
string (defaults to `^_`) which is used as a regexp for inferring
if a name is private or not.

For example:

```js
/** C */
class C {
  /** I'm public */
  m() {}
  /** I'm private */
  _p() {}
}
```

Fixes documentationjs#436
arv added a commit to arv/documentation that referenced this issue Jun 1, 2016
This adds a command line flag called `--infer-private` which is a
string (defaults to `^_`) which is used as a regexp for inferring
if a name is private or not.

For example:

```js
/** C */
class C {
  /** I'm public */
  m() {}
  /** I'm private */
  _p() {}
}
```

Fixes documentationjs#436
@tmcw tmcw closed this as completed in #441 Jun 1, 2016
rhendric pushed a commit to rhendric/documentation that referenced this issue Sep 15, 2022
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