4 ms·
Does this mean that with TypeScript someone could still see private values if they used their developer console on the browser, but with this approach that woul
by jamestimmins 8y ago
Does this mean that with TypeScript someone could still see private values if they used their developer console on the browser, but with this approach that would be impossible?
- james-mcelwain 8y agoAccess modifiers in TS are compile time only checks. This change is not about visibility in dev tools. I'd imagine you'll still be able to see and mutate private fields in dev console, just like you can in a Java debugger, etc. This change is for libraries, so that if someone consumes a TS library, for example, they can't monkey patch or otherwise touch private fields at runtime.