3 ms·
One more reason to just use Typescript.
by ssdspoimdsjvv 5y ago
One more reason to just use Typescript.
- andy_ppp 5y agoVariables are never truly private in the compiled JS though. You can fake it using clever closure techniques but there are still ways to access the vars as I understand it. This is fixing that at the JS level.
- tylerhou 5y agoI don’t know of any way of accessing lexically bound variables that are captured by a closure if there is no explicit getter.
- throw_m239339 5y agoTypescript is a mostly superset of javascript. Typescript does/will also support # for private fields so it changes absolutely nothing.