Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Function type in TypeScript

$
0
0

With regards to my previous question:

Convert the PropTypes compatible to TypeScript

if I have this function to pass:

const iconD = () => <span class='material-icons'>account_circle</span>

And, iconD will be pass to <TextField/>

<TextField        value={value}        inputGroupAddon={{          prepend: {            icon: iconD          }        }}      />

What TypeScript should the icon have?

I already tried:

type inputGroup = {  icon: ReactElement | string  class: string}

I'm still having this error:

enter image description here


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>