Port TS "Private" Variables to JavaScript Private Variables
See original GitHub issueIs your feature request related to a problem? Please describe.
TypeScript’s private
class property modifier is only checked when you are using TypeScript and the encapsulation is lost through compilation. Furthermore, we’re assuming that someone didn’t cast something as any
along the line in which “private” variables are not private at all.
Describe the solution you’d like
I think that it would be best if we migrate all instances of private
class properties to using the ES6 Private Variable syntax (#___
) to help mitigate the chances of users having unexpected bugs because they were using a property in their JavaScript (or any
-typed TypeScript). Also, this would help stop even more important mass code breakages from libraries using these private variables irresponsibly and causing issues for their unsuspecting users.
Describe alternatives you’ve considered
n/a
I am willing to work on this.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
I feel like this issue should be resolved as the
private
identifier no longer exists in std as far as I can tell.@sno2 feel free to start with code in
node/
andio/buffer.ts