I have a BackgroundImage component that receives a prop from its parent component:
<BackgroundImage backgroundImage={require("../../assets/png/backgroundImage1.png")}>
And the BackgroundImage component has backgroundImage as a prop. I need to specify an interface for the props:
const BackgroundImage: FunctionComponent<BackgroundProps> = ({ children, backgroundImage,}) => (<ImageBackground source={backgroundImage} style={styles.gradient}> {children}</ImageBackground>);
I am having troubles with specifying which type of prop is backgroundImage in the component interface. I don't want to use "any", like I am doing here:
interface BackgroundProps { backgroundImage: any;}
Which prop should I use instead of "any"? I am running out of options.