documentationjs / documentationjs/documentation

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

Aperta
#1,355 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
5.8k
Fork
481
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Riproduci il problema con gli esempi di campi statici pubblici e privati del report usando documentation.js 13.1.1. Traccia il modo in cui documentation.js analizza e assegna i nomi ai campi statici privati, quindi confronta la posizione generata con la documentazione prevista nell’ambito della classe. Il lavoro è completato quando il campo privato è documentato sotto la sua classe senza renderlo pubblico.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
documentation
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.