I am trying to document some classes using JSdoc comments and the JSdoc plugin.
/**
* @category SomeCategory
* @class
* @extends someClass
* @description Lorem ipsum
*/
class ExampleClass extends someClass{
#data: string[];
/**
* Constructs the ExampleClass.*/
constructor() {
this.#data = [];
}
public addData(newData: string): void {
this.#data.push(newData);
this.#logData(newData);
}
public getData(): string[] {
return this.#data.slice();
}
/**
* Processes the data by converting all entries to uppercase.
* @private
*/
#processData(): void {
this.#data = this.#data.map(d => d.toUpperCase());
}
public triggerDataProcessing(): void {
this.#processData();
}
}
However when I run the script to generate the html documentation I get this error:
ERROR: Unable to parse: Private name #processData is not defined.
New contributor
Tereza Hristova is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.