React Component Props Inference
СложнаяСоздайте utility type GetComponentProps<T> для Hack Frontend, который извлекает props из React компонента. Должен работать с функциональными компонентами, классами и forwardRef.
TypeScript•UTF-8
Run your code to see results.
Click the Run button above
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.