import React from 'react'; export declare type Merge = Omit & P2; export declare type MergeProps = P & Merge : never, P>; /** * Infers the OwnProps if E is a ForwardRefExoticComponentWithAs */ export declare type OwnProps = E extends ForwardRefComponent ? P : {}; /** * Infers the JSX.IntrinsicElement if E is a ForwardRefExoticComponentWithAs */ export declare type IntrinsicElement = E extends ForwardRefComponent ? I : never; export declare type NarrowIntrinsic = E extends keyof JSX.IntrinsicElements ? E : never; export interface ForwardRefComponent extends React.ForwardRefExoticComponent> { /** * When passing an `as` prop as a string, 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 define a `JSX.IntrinsicElements` overload so that * events are typed for consumers. */ >(props: MergeProps): React.ReactElement | null; /** * When passing an `as` prop as a component, use this overload. * Merges original own props (without DOM props) and the inferred props * from `as` element with the own props taking precendence. * * We don't use `React.ComponentType` here as we get type errors * when consumers try to do inline `as` components. */ (props: MergeProps): React.ReactElement | null; }