title: Merging TypeScript interfaces inside modules
body: <p>I'm trying to merge the Matchers interface from jasmine. 
  The interface is declare inside the jasmine namespace.</p>
  
  <p>I have created .d.ts file and added the following:</p>
  
  <pre><code>declare namespace jasmine {
      interface Matchers {
          toBeSuccessful(): boolean;
      }
  }
  </code></pre>
  
  <p>This works, but if I try to add an import statement to the .d.ts file it doesn't work. The <em>toBeSuccessful</em> function is not recognized. </p>
  
  <p>I also tried to add this portion of the code inside my implementation of the function and not inside of the d.ts file, but then, other members of the namespace are not available anymore, for instance in this code:</p>
  
  <pre><code>class ToBeSuccessfulMatcher implements jasmine.CustomMatcher {
      compare&lt;T&gt;(actual: Result&lt;T&gt;): jasmine.CustomMatcherResult {
      }
  }
  </code></pre>
  
  <p>The interfaces CustomMatcher and CustomMatcherResult are not available anymore.</p>
  
  <p>What am I missing?</p>