Accessing Private Fields in TypeScript

added by DotNetKicks
3/3/2017 2:22:55 PM

1 Kicks, 231 Views

Have you ever needed to access a private field in TypeScript? The most common place you may find yourself needing to do this is while writing a unit test. But, I also found myself needing to do this while using a JavaScript library where the field wasn't declared in the type file for the library I was using.