import { ComponentProps, ElementType, ReactElement } from "react"; /** * @see https://www.benmvp.com/blog/polymorphic-react-components-typescript/ */ export declare type AsProps = { as?: E; }; export declare type MergeProps = AsProps & Omit, keyof AsProps>; export declare type PolymorphicComponentProps = P & MergeProps; export declare type PolymorphicComponent = (props: PolymorphicComponentProps) => ReactElement | null;