title: Typescript type is missing the following properties while props are defined as optional
body: <p>I defined the properties in my <code>index.tsx</code> like this:</p>
  <pre><code>interface Props {
    uuid: string
    cdn?: string
    filename?: any
    classname?: any
    [key: string]: any
  }
  
  export const UCImage = ({
    uuid,
    cdn = 'https://ucarecdn.com/',
    filename,
    classname,
    ...props
  }: Props) =&gt; {
    // ...
  }
  </code></pre>
  <p>And I add the component like this in my <code>App.tsx</code>:</p>
  <pre><code>const App = () =&gt; {
    return (
      &lt;UCImage
        uuid='83c3bad4-b4bc-4cea-8702-88ee61b0b015'
        preview={{ width: 300, height: 300 }}
        setFill={{ color: 'ff0000' }}
      /&gt;
    )
  }
  </code></pre>
  <p>Somehow I still get the error:</p>
  <blockquote>
  <p>Type '{ uuid: string; preview: { width: number; height: number; };
  setFill: { color: string; }; }' is missing the following properties
  from type 'Props': filename, classname</p>
  </blockquote>
  <p>while the <code>filename</code> and <code>classname</code> are both optional parameters. Anyone with more experience in Typescript that can tell me why this doesn't work?</p>