import * as React from "react"; export type Merge = Omit & P2; /** * Infers the OwnProps if E is a ForwardRefExoticComponentWithAs */ export type OwnProps = E extends ForwardRefComponent ? P : {}; /** * Infers the JSX.IntrinsicElement if E is a ForwardRefExoticComponentWithAs */ export type IntrinsicElement = E extends ForwardRefComponent ? I : never; type ForwardRefExoticComponent = React.ForwardRefExoticComponent : never, OwnProps & { as?: E; }>>; export interface ForwardRefComponent extends ForwardRefExoticComponent { /** * When `as` prop is passed, use this overload. * Merges original own props (without DOM props) and the inferred props * from `as` element with the own props taking precendence. * * We explicitly avoid `React.ElementType` and manually narrow the prop types * so that events are typed when using JSX.IntrinsicElements. */ (props: As extends '' ? { as: keyof JSX.IntrinsicElements; } : As extends React.ComponentType ? Merge : As extends keyof JSX.IntrinsicElements ? Merge : never): React.ReactElement | null; } //# sourceMappingURL=index.d.ts.map