title: TypeScript React event handler error; type is not assignable to type (union)
body: <p>Using <code>react-scrollbars-custom@4.0.0-alpha.13</code> with TypeScript what would be the correct implementation of the <code>onScroll</code> event?  </p>
  
  <p>Edit: I suspect there's some kind of namespace conflict happening between TypeScript's general definition for <code>onScroll</code> and the plugin; finding references for <code>onScroll</code> has two results, which reflects the error given at the bottom of this question, specifically <code>not assignable to type '((event: UIEvent&lt;HTMLElement&gt;) =&gt; void) &amp; ((scrollValues: ScrollValues, prevScrollValues: ScrollValues) =&gt; void)</code></p>
  
  <p>I don't really understand what the &amp; in that type means, does it mean it's expecting some kind of union of two functions, how does that work, do I pass in all possible arguments?</p>
  
  <p>This is what I have now:</p>
  
  <pre><code>import * as React from "react";
  import { Scrollbar } from 'react-scrollbars-custom';
  
  export default class App extends React.Component  {
  
      handleScroll = (scrollValues : ScrollValues, prevScrollValues : ScrollValues)  =&gt; {
          // ...      
      }
  
      render() {
  
          return &lt;Scrollbar onScroll={this.handleScroll} style={{ position: "absolute", height:"100%", width:"100%" }}&gt;
          // ...
          &lt;/Scrollbar&gt;
      }   
  }
  </code></pre>
  
  <p>This is the error message:</p>
  
  <p><code>Error  TS2322  (TS) Type '(scrollValues: ScrollValues, prevScrollValues: ScrollValues) =&gt; void' is not assignable to type '((event: UIEvent&lt;HTMLElement&gt;) =&gt; void) &amp; ((scrollValues: ScrollValues, prevScrollValues: ScrollValues) =&gt; void)'.
    Type '(scrollValues: ScrollValues, prevScrollValues: ScrollValues) =&gt; void' is not assignable to type '(event: UIEvent&lt;HTMLElement&gt;) =&gt; void'</code></p>