title: The correct way to extend DefinitelyTyped Definitions? (TypeScript v.2.3.4)
body: <p>After quite some research I managed to merge my interface <code>IRequestShortcutConfig</code>with the existing one provided by @types/angular.
  I created a separate file containing my interface:</p>
  
  <pre><code>// custom.d.ts
  export {}; // Ensure this is treated as a module.
  
  declare module 'angular' {
      interface IRequestShortcutConfig {
          tracker?: any;
      } 
  }
  </code></pre>
  
  <p>The first 'specialty' is that according to <a href="https://github.com/Microsoft/TypeScript-Handbook/issues/258#issuecomment-213490734" rel="nofollow noreferrer">https://github.com/Microsoft/TypeScript-Handbook/issues/258#issuecomment-213490734</a> we need to have at least one top-level export or import statement. </p>
  
  <blockquote>
    <p>You can only augment ES6 modules if you're inside an ES6 module already.</p>
  </blockquote>
  
  <p><strong>Why is that the case?</strong> </p>
  
  <p>The second thing that I found a little bit confusing is that in the DefinitelyTyped definition the interface is defined like this:</p>
  
  <pre><code>declare namespace angular {
      interface IRequestShortcutConfig extends IHttpProviderDefaults {
          /**
           * {Object.&lt;string|Object&gt;}
           * Map of strings or objects which will be turned to ?key1=value1&amp;key2=value2 after the url. If the value is not a string, it will be JSONified.
           */
          params?: any;
  
          /**
           * {string|Object}
           * Data to be sent as the request message data.
           */
          data?: any;
  
          /**
           * Timeout in milliseconds, or promise that should abort the request when resolved.
           */
          timeout?: number|IPromise&lt;any&gt;;
  
          /**
           * See [XMLHttpRequest.responseType]https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype
           */
          responseType?: string;
  
      }
  }
  </code></pre>
  
  <p>However to actually augment the namespaced interface we need to wrap the interface with <code>declare module 'angular'</code> and not <code>declare namespace angular</code> as illustrated in my file <code>custom.d.ts</code> at the beginning of this question.</p>
  
  <p>Quote from the Typescript-Handbook:</p>
  
  <blockquote>
    <p>A note about terminology: It’s important to note that in TypeScript 1.5, the nomenclature has changed. “Internal modules” are now “namespaces”. “External modules” are now simply “modules”, as to align with ECMAScript 2015’s terminology, (namely that module X { is equivalent to the now-preferred namespace X {).</p>
  </blockquote>
  
  <p><strong>So an 'external' module is simply a module that has been 'imported'?</strong></p>
  
  <p>It does work, but I am wondering if this is the correct way of extending typings (@types) that are installed via npm?</p>