React Component Props Inference

Сложная

Создайте utility type GetComponentProps<T> для Hack Frontend, который извлекает props из React компонента. Должен работать с функциональными компонентами, классами и forwardRef.

Примеры:

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