title: Need help fixing or suppressing this tslint error: TS2742
body: <p>I have this file in a react native project:</p>
  <pre><code>import styled, { withTheme } from 'styled-components';
  import { BaseText } from '../BaseText';
  
  export interface BodyProps {
    textAlign?: string;
    fontSize?: string;
  }
  
  export const Body = withTheme(styled(BaseText)&lt;BodyProps&gt;`
    text-align: ${props =&gt; (props.textAlign ? props.textAlign : 'center')};
    font-size: ${props =&gt; (props.fontSize ? props.fontSize : '16px')};
  `);
  </code></pre>
  <p>I upgraded react native from 0.61.5 to 0.63.2 and started getting this lint error wherever <code>withTheme</code> is being used:</p>
  <blockquote>
  <p>TS2742: The inferred type of 'Body' cannot be named without a
  reference to 'react-native/node_modules/@types/react'. This is likely
  not portable. A type annotation is necessary.</p>
  </blockquote>
  <p><strong>I tried</strong> several things, but the error remains the same:</p>
  <ol>
  <li>Following <a href="https://github.com/yarnpkg/berry/issues/227" rel="nofollow noreferrer">this post</a>, I added <code>import React from &quot;react&quot;;</code></li>
  <li>Tried to disable tslint by adding <code>/* tslint:disable */</code> above the <code>Body</code> declaration</li>
  <li>Tried to disable tslint by adding <code>// tslint:disable-next-line</code> above the <code>Body</code> declaration</li>
  <li>Played with dependency versions. Currently I have <code>&quot;@types/react&quot;: &quot;^16.9.49&quot;</code>.</li>
  </ol>