I come from a Java background and I defaulted to using getter/setter naming conventions in my Typescript/Angular component classes familiar to me.
getFoo()
setFoo()
However, it seems that this may not be the best practice, but rather I should use the convention
get foo()
set foo()
Questions
- Is this purely cosmetic? Any benefits? I don't understand why this would be favored since it is, to my understanding, inconsistent with the naming convention used for other methods.
- Is there a formal style guide recommending this practice?