title: Type '(text: string) => void' is not assignable to type '() => any'
body: <p>I am trying to use <a href="https://reactnativeelements.com/docs/searchbar/" rel="nofollow noreferrer">SearchBar</a> from the reactnativeelements as follows:</p>
  <pre><code>
  export function EditHash({ navigation, route }: ModifyHashProps) {
  
      const [searchQuery, setSearchQuery] = React.useState(&quot;&quot;);
  
      const handleSearchChange = (text: string) : void =&gt; setSearchQuery(text);
  
      return (
          &lt;SafeAreaView&gt;
  
                  &lt;SearchBar
                      placeholder=&quot;type hashtag&quot;
                      lightTheme={true}
                      inputContainerStyle={{
                          backgroundColor: &quot;#FFFFFF&quot;,
                          height:30
                      }}
                      containerStyle={{
                          backgroundColor: &quot;#FFFFFF&quot;,
                          borderWidth: 1,
                          borderColor: &quot;#E5E6E6&quot;,
                          borderRadius: 10,
                          marginLeft: 20,
                          marginRight: 20,
                      }}
                      value={searchQuery}
                      onChangeText={handleSearchChange}
                  /&gt;
  
          &lt;/SafeAreaView&gt;
  
      );
  }
  </code></pre>
  <p>Unfortunately, the compiler complains about the <code>onChangeText</code> function assignment:</p>
  <pre><code>Type '(text: string) =&gt; void' is not assignable to type '((text: string) =&gt; void) &amp; ((text: string) =&gt; void) &amp; (() =&gt; any) &amp; (() =&gt; any) &amp; (() =&gt; any) &amp; ((text: string) =&gt; void) &amp; (() =&gt; any) &amp; (() =&gt; any) &amp; (() =&gt; any)'.
    Type '(text: string) =&gt; void' is not assignable to type '() =&gt; any'.
  </code></pre>
  <p>According to the type definition, it should be fine:</p>
  <p><a href="https://i.stack.imgur.com/6q5WB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6q5WB.png" alt="enter image description here" /></a></p>
  <p>What am I doing wrong?</p>