React Component Props Inference

Hard

Create utility type GetComponentProps<T> for Hack Frontend that extracts props from React component. Should work with functional components, classes, and forwardRef.

Examples:

Input 1: type Props = GetComponentProps<typeof HackFrontendButton>
Output 1: { label: string; onClick: () => void }
Output
Run your code to see results.