Home » Posts tagged "private"

Accessing Private Fields in TypeScript

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.

Now, suppose you could access those private fields effortlessly and easily.  How valuable would that be to you?

Accessing Private Fields in TypeScript
Photo via VisualHunt

Continue reading “Accessing Private Fields in TypeScript”