title: TypeScript: make class visible inside module only
body: <p>Have a look at the following code:</p>
  
  <pre><code>module MyModule {
      class MyPrivateClass {
          ...
      }
  
      export class MyPublicClass {
          private var: MyPrivateClass; // MyPrivateClass is unknown
      }
  }
  </code></pre>
  
  <p>I want <em>MyPrivateClass</em> to be only visible inside <em>MyModule</em>, specifically for internal use in <em>MyPublicClass</em>. Outside <em>MyModule</em>, only <em>MyPublicClass</em> should be visible. I figured that the above layout should do but VS complains that <em>MyPrivateClass</em> isn't visible inside <em>MyPublicClass</em>.
  Adding export before the definition of <em>MyPrivateClass</em> makes it visible to <em>MyPublicClass</em> but then it's also visible from the outside.</p>
  
  <p>Is there a way to make it visible to <em>MyPublicClass</em> only?</p>
  
  <p>Thank you.</p>