title: TypeScript error when using d3.timeFormat in axis.tickFormat()
body: <p>This code works in JavaScript:</p>
  
  <pre><code>var timeFormat = d3.timeFormat("%M:%S");
  var yAxis = d3.axisLeft(y).tickFormat(timeFormat)
  </code></pre>
  
  <p>But this code in TypeScript does not work:</p>
  
  <pre><code>const yAxis = d3.axisLeft(y).tickFormat(d3.timeFormat("%M:%S"));
  </code></pre>
  
  <blockquote>
    <p>function timeFormat(specifier: string): (date: Date) => string Returns
    a new formatter for the given string specifier. The returned function
    formats a specified date, returning the corresponding string.</p>
    
    <p>An alias for locale.format (TimeLocaleObject.format) on the default
    locale.</p>
    
    <p>@param specifier — A specifier string for the date format.</p>
  </blockquote>
  
  <p>The error is</p>
  
  <blockquote>
    <p>Argument of type '(date: Date) => string' is not assignable to parameter of type 'null'.ts(2345)</p>
  </blockquote>