title: How can I declare an interface, function, and variable with the same name?
body: <p>How can I declare an interface, function, and variable with the same name?</p>
  
  <p>E.g. I want to use the function like:</p>
  
  <pre><code>declare function someName(...args: any[]);
  
  someName('foo');
  </code></pre>
  
  <p>The interface: </p>
  
  <pre><code>interface someName {
      (...args: any[]): someName
  }
  
  function test(arg: someName): someName {
  }
  </code></pre>
  
  <p>And use it as a variable (for NodeJS) which should get output as is in the compiled JS.</p>
  
  <pre><code>var someName = require('someName');
  </code></pre>