title: Spread operator is not working in react typescript
body: <p>I am using React + typescript and encountered with a problem regarding rendering a component.</p>
  
  <p>Here is the code of what I have tried</p>
  
  <pre><code>filterCellComponent = ({ column, ...restProps }) =&gt; (
          &lt;TableFilterRow.Cell
              column={column}
              {...restProps} /&gt;
      );
  </code></pre>
  
  <p>In the above method, i use the {column} variable to perform some conditions and then I render the  with use of {...restProps}. But I am getting a syntax error saying some props are missing. But when I debug, all the props that are required are inside the {...restProps} variable. I do not understand why this is happening.</p>
  
  <p>Here is the image that shows the error:
  <a href="https://i.stack.imgur.com/LT1fp.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LT1fp.png" alt="enter image description here"></a></p>
  
  <p>And this is the error message that i'm getting
  <a href="https://i.stack.imgur.com/xCQbm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xCQbm.png" alt="enter image description here"></a></p>
  
  <p>Any idea on why this is happening?</p>
  
  <p>Thanks</p>