TypeScript-Handbook
TypeScript-Handbook copied to clipboard
getter and setter in example are using a private name with "_"
According to:
https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines
6. Do not use "_" as a prefix for private properties.
The getter/setter example here: https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Classes.md ..is not examplary.
feel free to send a PR to change it to name
Actually it's as intended, and those are our own coding guidelines.
The reason it needs to be underscored is that we need some name for the backing field. What would you call it otherwise?
The reason it needs to be underscored is that we need some name for the backing field. What would you call it otherwise?