eps1lon/types-react-codemod

If the original type is React.PropsWithChildren, using codemod will still add an extra PropsWithChildren

Closed this issue · 2 comments

version: types-react-codemod@3.3.0

-  React.FC<React.PropsWithChildren<Props>>
+  React.FC<React.PropsWithChildren<React.PropsWithChildren<Props>>>

image

We can do this for apparent nestings but we'd still miss

type Props = React.PropsWithChildren<...>
const Component: React.FC<Props>

and apply a redundant PropsWithChildren.

I don't consider this a bug since the behavior is still the same. Contributions are appreciated.

okok