title: How to merge namespace has no exported interface in TypeScript
body: <p>I am using the queue lib Bull in TypeScript. Its definition is:</p>
  
  <p><strong>node_modules/@types/bull/index.d.ts</strong></p>
  
  <pre><code>declare const Bull: {
    (queueName: string, opts?: Bull.QueueOptions): Bull.Queue;
    // something like above
  };
  
  declare namespace Bull: {
    interface Queue {}
    interface Job {}
  
    // some other non-exported interfaces
  }
  
  export = Bull
  </code></pre>
  
  <p>I want to merge the namespace <code>Bull</code> in my library and use it in another app.</p>
  
  <p><strong>node_modules/myLib/index.d.ts</strong></p>
  
  <pre><code>import { Queue } from 'bull'
  
  declare namespace Bull: {
    export interface Queues {}
  }
  
  export interface myInterface {
    foo: Queue | Bull.Queues
  }
  
  export = Bull
  </code></pre>
  
  <p><strong>myApp/foo.ts</strong></p>
  
  <pre><code>import { Job, Queues } from 'myLib' // Error, 'myLib' has no exported member 'Job'
  </code></pre>
  
  <p>According to the doc, namespace is a GLOBAL variable, and namespaces of the same name will merge their EXPORTED interfaces. So, how can I merge the namespace <code>Bull</code> from <code>@types/bull</code>? Thanks!</p>