title: Typescript .d.ts declare object literal with optional keys in function signature?
body: <p>I have a <code>.d.ts</code> file like:</p>
  <pre class="lang-js prettyprint-override"><code>declare function myfunc(): {
    something: (err, { req, res, errorInfo, query, pathname, extra }?) =&gt; void;
  };
  </code></pre>
  <p>So it declares a function that has two args, the second being an optional &quot;options&quot; object.</p>
  <p>But I want also to make the <em>keys</em> of the options object optional, i.e. so I can legally pass a partial object as the second arg.</p>
  <p>What is the syntax for that?</p>