Last active
May 5, 2018 20:55
-
-
Save jtmthf/85901a1e9bdb850b4b8dfc5e0551919e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Props<T> = T extends 'div' | |
? JSX.IntrinsicElements['div'] | |
: T extends keyof JSX.IntrinsicElements | |
? TagProps<T> | |
: T extends Component<infer P> | |
? ComponentClassProps<T, P> | |
: T extends SFC<infer P> ? StatelessComponentProps<P> : never; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment