title: Unable to extend typings of sinon
body: <p>I'm having trouble getting <a href="https://github.com/substantial/sinon-stub-promise" rel="nofollow">sinon-stub-promise</a> to work with typescript. The definition file in <code>@types/sinon-stub-promise</code> lacks the default export. I followed the <a href="https://www.typescriptlang.org/docs/handbook/declaration-merging.html" rel="nofollow">docs on declaration merging</a> closely but it doesn't compile.</p>
  
  <p>Compile Error:</p>
  
  <pre><code>index.ts(4,18): error TS2345: Argument of type 'typeof 'sinon'' is not assignable to parameter of type 'SinonSandbox'.                                            
    Property 'clock' is missing in type 'typeof 'sinon''.                                                                                                           
  index.ts(6,25): error TS2339: Property 'stub' does not exist on type 'typeof 'sinon''. 
  </code></pre>
  
  <p>Sinon's definition file:</p>
  
  <pre><code>declare namespace Sinon {
    // ...
  
    interface SinonStubStatic {
      (): SinonStub;
      (obj: any): SinonStub;
      (obj: any, method: string): SinonStub;
      (obj: any, method: string, func: any): SinonStub;
    }
  
    // ...
  
    interface SinonFakeTimers {
      now: number;
      create(now: number): SinonFakeTimers;
      setTimeout(callback: (...args: any[]) =&gt; void, timeout: number, ...args: any[]): number;
      // ...
    }
  
    interface SinonSandbox {
      clock: SinonFakeTimers;
      // ...
      stub: SinonStubStatic;
      // ...
    }
  }
  </code></pre>
  
  <p>Adjusted <a href="https://github.com/substantial/sinon-stub-promise" rel="nofollow">sinon-stub-promise</a> typings:</p>
  
  <pre><code>// Generated by typings
  // Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/sinon-stub-promise/sinon-stub-promise.d.ts
  /// &lt;reference path="../../../node_modules/@types/sinon/index.d.ts" /&gt;
  declare module 'sinon' {
    interface SinonPromise {
      resolves(value?: any): void;
      rejects(value?: any): void;
    }
  
    interface SinonStub {
      returnsPromise(): SinonPromise;
    }
  }
  
  // Added by me, because this is missing in the typings on dt
  declare module 'sinon-stub-promise' {
    function setup(sinon: Sinon.SinonSandbox): void;
    export = setup;
  }
  </code></pre>
  
  <p>index.ts</p>
  
  <pre><code>import * as sinon from 'sinon';
  import sinonStubPromise = require('sinon-stub-promise');
  
  sinonStubPromise(sinon);
  </code></pre>
  
  <p>Minimal sample repo: <a href="https://github.com/marvinhagemeister/typings-bug" rel="nofollow">https://github.com/marvinhagemeister/typings-bug</a></p>