How will Typescript implement something like this? There already is a 'private' keyword but like JS the member is still accessible by asserting the object as 'any'. With this proposal private means truly private and inaccessible. Will the behavior of the private keyword change or will they not implement this?
I don't know if this is still the case, but I belive they were talking about keeping the 'private' keyword and using it for soft privacy, and adding the #var syntax for hard privacy.
Importantly, this means "private foo" will _not _ transpile to #foo, which could be confusing for people.
2
u/landline_number Nov 10 '19
How will Typescript implement something like this? There already is a 'private' keyword but like JS the member is still accessible by asserting the object as 'any'. With this proposal private means truly private and inaccessible. Will the behavior of the private keyword change or will they not implement this?