title: What is causing this Typescrip Error with SX prop
body: <p>I got this example form here <a href="https://mui.com/system/the-sx-prop/" rel="nofollow noreferrer">https://mui.com/system/the-sx-prop/</a> but I get this error from typescript.</p>
  <pre><code>sx={(theme: Theme): SxProps&lt;Theme&gt; | undefined =&gt; ({
    ...theme.typography.body,
    color: theme.palette.primary.main,
  })}
  </code></pre>
  <pre><code>Type '(theme: Theme) =&gt; SxProps&lt;Theme&gt; | undefined' is not assignable to type 'SxProps&lt;Theme&gt; | undefined'.
    Type '(theme: Theme) =&gt; SxProps&lt;Theme&gt; | undefined' is not assignable to type 'CSSSelectorObject&lt;Theme&gt;'.
      Index signature for type 'string' is missing in type '(theme: Theme) =&gt; SxProps&lt;Theme&gt; | undefined'.ts(2322)
  StatusBar.component.tsx(46, 12): Did you mean to call this expression?
  </code></pre>