I have some code that looks like this:
export class Viewer {
private scene = new Scene();
}
Then when I import it as try:
const viewer = new Viewer();
then if I try:
viewer.scene it is now available unless I change:
private scene = new Scene();
TO
public scene = new Scene();
My question is:
How can I access the property without changing private to public?
publicwas inherently bad practice, it wouldn't exist. It's the context of how you use certain methodologies that make them bad practice - not the methodologies themselves.