Is there a way to access private properties of a class in TypeScript that are denoted by the prefix # symbol? I need this for unit testing purposes.
class A {
#pr: number;
pu: number
constructor(pr: number, pu: number) {
this.#pr = pr;
this.pu = pu;
}
}
let a = new A(10, 9);
console.log(a.pu, a.#pr);
I attempted using console.log(a.pu, a["#pr"]);
but it did not work. Any suggestions?