import React from 'react';

import ButtonLike, { ButtonLikeProps } from './ButtonLike';

export interface ButtonProps extends Omit<ButtonLikeProps<'button'>, 'as' | 'ref'> {}

const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
    (props: ButtonProps, ref: React.Ref<HTMLButtonElement>) => {
        return <ButtonLike type="button" ref={ref} {...props} as="button" />;
    }
);

export default Button;

import React from 'react';

import ButtonLike, { ButtonLikeProps } from './ButtonLike';

export interface ButtonProps extends Omit<ButtonLikeProps<'button'>, 'as' | 'ref'> {}

const Button = (props: ButtonProps, ref: React.Ref<HTMLButtonElement>) => {
    return <ButtonLike type="button" ref={ref} {...props} as="button" />;
};

export default React.forwardRef<HTMLButtonElement, ButtonProps>(Button);

--- 
+++ 
@@ -4,8 +4,10 @@
 
 export interface ButtonProps extends Omit<ButtonLikeProps<'button'>, 'as' | 'ref'> {}
 
-const Button = (props: ButtonProps, ref: React.Ref<HTMLButtonElement>) => {
-    return <ButtonLike type="button" ref={ref} {...props} as="button" />;
-};
+const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
+    (props: ButtonProps, ref: React.Ref<HTMLButtonElement>) => {
+        return <ButtonLike type="button" ref={ref} {...props} as="button" />;
+    }
+);
 
-export default React.forwardRef<HTMLButtonElement, ButtonProps>(Button);
+export default Button;
Change usage of forwardRef to enable typescript docgen again
