I have a custom generic type that uses React's `ComponentProps` internally.  

When I create the type of a component's props using this custom type, TS behaves strangely.  

Here is a simple example:  

[Codesandbox Link](https://codesandbox.io/s/clever-waterfall-kkqhp?file=/src/Foo.tsx)

You can see in the link above that when I use `PropsWithAs` generic type, TS only understands that `fallbackText` is in the props if I access it directly. But it fails to get the fact that `fallbackText` is in in the `rest` variable when I use rest syntax.

```
type Props<T extends ElementType = "div"> = PropsWithAs<
  T,
  {
    fallbackText: string;
    counter: number;
  }
>;

const Foo = <T extends ElementType>(props: Props<T>): JSX.Element => {
  // fallbackText is present and identified by TS here without any issue:
  const { fallbackText } = props;

  const { counter, ...rest } = props;

  // But TS doesn't see that `rest` also includes fallbackText here:
  return <Bar {...rest} />;
};

```