Re:TypeScript’s quirks: How inconsistencies make the languag...
by evmar on Friday January 31, 2020 @08:07PM
(#22207746)
At runtime, TypeScript is JavaScript, so depending on your perspective either encapsulation is impossible (because you don't have types to defend you) or easy (because you use the patterns that JS has to defend encapsulation at runtime, without types).
[ Parent
| on HN ]
Re:TypeScript’s quirks: How inconsistencies make the languag...
by recursive on Friday January 31, 2020 @09:56PM
(#22208311)
#private is coming soon, so that won't really be true any more. https://github.com/microsoft/TypeScript/pull/30829
You'll have class members with accessibility in their declaration, and real run-time encapsulation.