import React from 'react'; export declare type GenericComponent = keyof JSX.IntrinsicElements | React.ComponentType; declare type Without = Pick>; declare type Props = C extends keyof JSX.IntrinsicElements ? Without, 'as'> : C extends React.ComponentType ? Without : never; export declare type AsProps = { as?: C; } & Props; declare type PolyProps = T extends keyof JSX.IntrinsicElements ? P & Omit : T extends React.ComponentType ? P & Omit : never; export interface PolyFC { (p: { as?: T; } & PolyProps): React.ReactElement | null; propTypes?: React.WeakValidationMap

; defaultProps?: Partial

; displayName?: string; } declare type PolyRefProps = T extends keyof JSX.IntrinsicElements ? P & Omit : T extends React.ComponentType ? P & Omit : never; export interface PolyFCWithRef { (p: { as?: T; } & PolyRefProps): React.ReactElement | null; propTypes?: React.WeakValidationMap

; defaultProps?: Partial

; displayName?: string; } export declare const polyForwardRef: >(func: = D>(p: { as?: T | undefined; } & PolyProps, ref: React.ComponentPropsWithRef["ref"]) => React.ReactElement | null) => PolyFCWithRef; export {};