import { Simplify, ConditionalKeys } from 'type-fest'; export { ConditionalKeys, Simplify } from 'type-fest'; import { ComponentType, RefAttributes, PropsWithChildren, PropsWithoutRef, ReactNode } from 'react'; declare const Extract: unique symbol; declare const Spy: unique symbol; type PropsOf = T extends ComponentType ? P : never; declare function withProps, K extends keyof PropsOf, R = unknown>(component: T, initialProps: Simplify, K>>): ComponentType, keyof typeof initialProps | 'ref'> & RefAttributes>>; type HowOf> = Simplify<{ [K in keyof Omit>, 'children' | 'key' | 'ref'>]: typeof Extract | typeof Spy; } & { children?: never; key?: never; ref?: typeof Extract | undefined; }>; type RefOf = T extends RefAttributes ? R : never; declare function wrapWith>, const How extends HowOf>(containerComponent: ContainerComponentType, how: How): , ConditionalKeys>, Ref extends RefOf<(typeof how)['ref'] extends typeof Extract ? PropsOf : ContentProps>>(contentComponent: ComponentType) => ComponentType & Pick, ConditionalKeys>> & RefAttributes>>; declare function wrapWith>(containerComponent: ContainerComponentType, how?: undefined): , Ref = RefOf>>(contentComponent: ContentComponentType) => ComponentType> & RefAttributes>>; export { Extract, type HowOf, type PropsOf, type RefOf, Spy, withProps, wrapWith };