type AsProp = { as?: T; }; export type PolymorphicRef = React.ComponentPropsWithRef["ref"]; export type PolymorphicComponentProps = AsProp & Omit & { ref?: PolymorphicRef; }, keyof Props> & Props; export type PolymorphicComponentPropsWithOutRef = AsProp & Omit, keyof Props> & Props; export {};