title: How can I import a CommonJS module that exports a single function from TypeScript
body: <p>Given this CommonJS module:</p>
  
  <pre><code>// cjs.js
  module.exports = () =&gt; console.log("hi");
  </code></pre>
  
  <p>What can I put in my .d.ts</p>
  
  <pre><code>// cjs.d.ts
  export ????
  </code></pre>
  
  <p>So that I can do a star import like this from a TypeScript file and pick up the correct types:</p>
  
  <pre><code>// main.ts
  import * as log from "./cjs"
  
  log()
  </code></pre>