extract-react-types icon indicating copy to clipboard operation
extract-react-types copied to clipboard

Feat: Add support for memo wrapped around a component as an assigned variable

Open safiranugroho opened this issue 4 years ago • 0 comments

🤩 Currently type inference works for the following cases:

memo((props: ComponentProps) => {}); 
memo(forwardRef<HTMLElement, ComponentProps>(() => {}));

const Component = forwardRef<HTMLElement, ComponentProps>(() => {});
memo<ComponentProps>(Component);

🤯 It would be cool for it to also work for this pls:

const Component = forwardRef<HTMLElement, ComponentProps>(() => {});
memo(Component);

safiranugroho avatar Mar 08 '21 04:03 safiranugroho