Last active
March 20, 2020 10:01
-
-
Save itsdouges/12a717ae484b0a4aef364013c1ce41c7 to your computer and use it in GitHub Desktop.
This is some bullshit
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
// Dirty hack to get generics working with forward ref [1/2] | |
interface CustomItemType { | |
<TComponentProps extends {}>( | |
props: CustomItemProps<TComponentProps> & { ref?: any } & Omit< | |
TComponentProps, | |
keyof CustomItemComponentProps | |
>, | |
): JSX.Element | null; | |
} | |
const CustomItem: CustomItemType = forwardRef<HTMLElement, CustomItemProps>( | |
// Dirty hack to get generics working with forward ref [2/2] | |
) as any; | |
export CustomItem; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment