When starting out with building Aurelia custom elements (using typescript) I decided to declare members only used by the custom element as
private, even if they are also used in the html template. This makes them hidden if someone decides to make a
view-model.ref on the element and access the custom element class through code, but since “
Now my IDE of choice, Visual Studio 2017, has gotten more clever with typescript classes and started doing this for these private members as they are only read in the html template;
So my instinct is to now remove
private on these members so that the IDE wont confuse myself and my colleagues. But then it will exposed if someone interacts with the element through code as described above, which could cause unexpected usage of the custom element.
What are your thoughts on this?