title: React Native functions in Stylesheet typescript
body: <p>I don't understand how to create a good interface dynamic stylesheet</p>
  <pre><code>interface Styles {
    container: (backgroundColor: string) =&gt; StyleProp&lt;ViewStyle&gt;;
    image: (color: string) =&gt; StyleProp&lt;ImageStyle&gt;;
  }
  
  const styles = StyleSheet.create&lt;Styles&gt;({
    container: (backgroundColor: string) =&gt; ({
      width: &quot;100%&quot;,
      height: &quot;100%&quot;,
      backgroundColor,
    }),
    image: (color: string) =&gt; ({
      width: 10,
      height: 10,
      tintColor: color,
    }),
  });
  
  </code></pre>
  <p>I got an error like this :</p>
  <pre><code> Type '(backgroundColor: string) =&gt; StyleProp&lt;ViewStyle&gt;' is not assignable to type 'ViewStyle | ImageStyle | TextStyle'
  </code></pre>