title: Working around unset "length" property on partial functions created with lodash's partialRight
body: <p>I'm working with <a href="https://momentjs.com/timezone/docs/" rel="noreferrer">MomentTimezone</a> for time manipulation in the browser.</p>
  
  <p>I am using TypeScript and <a href="https://lodash.com/docs/4.17.15" rel="noreferrer">Lodash</a> too.</p>
  
  <p>I have some <code>accountTimezone</code> set on the <code>window</code> containing the authenticated user's preferred timezone. I am trying to create a helper method <code>localMoment()</code> that will accept any of <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a3528daaf0b06c5ed3864bf4c28a0c438fd374a3/types/moment-timezone/moment-timezone.d.ts#L21-L32" rel="noreferrer">the many signatures of <code>moment.tz()</code></a>, appending this <code>window.accountTimezone</code> as the final <code>timezone: string</code> argument.</p>
  
  <p>It seems <a href="https://lodash.com/docs/4.17.15#partialRight" rel="noreferrer"><code>partialRight</code></a> may be what I'm looking for.</p>
  
  <pre><code>const localMoment = partialRight(moment.tz, window.accountTimezone);
  </code></pre>
  
  <p>The problem I'm having has to do with this note from the lodash docs:</p>
  
  <blockquote>
    <p><strong>Note:</strong> This method doesn't set the "length" property of partially applied functions.</p>
  </blockquote>
  
  <p>Specifically, for a call like <code>localMoment('2019-08-01 12:00:00')</code>, TypeScript complains that <code>localMoment()</code> was provided 1 argument, but expects zero.</p>
  
  <p><strong>How can I keep TypeScript happily understanding a call to <code>localMoment()</code> should look like a call to <code>moment.tz()</code> via the <code>MomentTimzone</code> interface, while avoiding this arity confusion from the use of <code>partialRight()</code>?</strong></p>
  
  <hr>
  
  <p>I considered something like this as an alternative, but don't know how to type <code>...args</code> to keep TypeScript happy.</p>
  
  <pre><code>const localMoment = (...args): Moment =&gt; moment.tz(...args, window.accountTimezone);
  </code></pre>