title: declare module vs declare namespace typescript
body: <p>I am a little confused about the difference between <code>declare module</code> and <code>declare namespace</code> in typescript internal modules.</p>
  
  <p>Another point which I am not clear: is it a good idea to have complex namespaces to typescript internal modules.</p>
  
  <p>e.g.</p>
  
  <pre class="lang-js prettyprint-override"><code>declare module com.xyz.company.test.mynamespace {
      interface Iabc {
          // stuff  
      }
  
      interface Ixys{ 
         //stuff 
      }
  
      // or
  
      export interface Ipqr { 
          // stuff 
      }
  }
  </code></pre>