title: Typescript definitions file cannot make a method implement an object interface
body: <p>I want to generate a definition file for pnotify.</p>
  
  <pre><code>/// &lt;reference path="./jquery.d.ts"/&gt;
  
  interface pnotifyDefaults {
      styling?: string;
      history?: boolean;
  }
  
  interface pnotifyInterface {
      defaults?: pnotifyDefaults
  }
  
  interface JQueryStatic {
      pnotify(options: any): any;
  
      pnotify: pnotifyInterface;
  
      pnotify_remove_all(): void;
  
  }
  
  
  declare module 'jquery.pnotify' {
  }
  </code></pre>
  
  <p>This accutally does not compile and the compiler complains:</p>
  
  <pre><code>Duplicate identifier 'pnotify'. Additional locations: jquery.pnotify.d.ts(15,5)
  </code></pre>
  
  <p>But how can I achieve that behaviour as in my js code I want to use pnotify like:</p>
  
  <pre><code>$.pnotify(opts)
  </code></pre>
  
  <p>But also like that:</p>
  
  <pre><code>$.pnotify.defaults.history = false;
  </code></pre>