documentationjs / documentationjs/documentation

private static class field naming-issue when using Object.freeze()

Open
#1,355 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.8k
Forks
481
PR merge metrics
No merged PRs in 30d

Description

### non-private field :+1:
```js
/**
* Holding builtin toHtml variants.
* @property {toHtml} classic - designed for {@link TaxiOptions}.data type of string[].
*/
static ToHtml = Object.freeze({
classic: (entry) => {
return `


${entry}
`;
},
});
```
returns this documentation: (within the class scope)
![image](https://user-images.githubusercontent.com/56562982/106604474-fa442300-655f-11eb-99c6-c52a1bc45093.png)

### private field 👎🏼
where as this code (which is also within said class scope)
```js
/**
*
* Default TaxiOptions, to be used incase of none given.
* @property {*} data - ["Volkwagen", "Mercedes", "Daimler"]
* @property {query} query - {@link #taxiquery}
*/
static #TaxiOptionsDefaults = Object.freeze({
data: ["Volkwagen", "Mercedes", "Daimler"],
query: Taxi.Query.strict,
toHtml: Taxi.ToHtml.classic,
minChar: 1,
showWarnings: true,
});
```
Turns up below the class, as the following.
![image](https://user-images.githubusercontent.com/56562982/106604611-295a9480-6560-11eb-9202-72eeedcd146b.png)

### I tried:
giving a `* @name ANYTHING_BUT_FREEZE` to the latter documentation, which didnt work.
and that is about it, i really like documentation.js but I don't know how to fix it apart from making it public which I'm not a fan of, since they needn't be public.

* What version of documentation.js are you using?: 13.1.1
* How are you running documentation.js (on the CLI, Node.js API, Grunt, other?): via npm(node.js) global install without sudo(not that that would make a difference)

any help would be appreciated, also if it means I need to change my code to something else, as long as it's not going to be public :D

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.