title: Friend class in TypeScript
body: <p>In C++ there is something called a friend class. As far as I know, there's no such thing in TypeScript/JavaScript. Is there a way to simulate such behavior of friend class in TypeScript/JavaScript?</p>
  
  <p>To give better context (if needed) of why and what I try to do, I make some small game for fun (and to learn stuff) and try to do <a href="http://gameprogrammingpatterns.com/spatial-partition.html#a-grid-of-linked-units" rel="noreferrer">this</a>. At the moment I just use public methods and everything works, but I would like to limit accessibility of those methods to just one other class. I use TypeScript, if that helps.</p>