import * as React from "react"; /** * @template T Object * @template K Union of T keys */ export declare type Omit = Pick>; /** * @template T Object * @template K Union of keys (not necessarily present in T) */ export declare type Without = Pick>; /** * Transform `"a" | "b"` into `"a" & "b"` * @template U Union */ export declare type UnionToIntersection = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never; /** * Get component props * @template T Component type */ export declare type ComponentToProps = T extends React.ComponentType | React.Component | React.ExoticComponent ? P : never; /** * Use prop * @template P Props type */ export declare type UseProp

= keyof JSX.IntrinsicElements | React.ComponentType

; /** * Remove use props from object `T` if they're present * @template T Object */ export declare type WithoutUseProps = Without; /** * Remove ref prop from object `T` if it's present * @template T Object */ export declare type WithoutRef = Without; /** * Grab components passed to the `use` prop and return their props * @template T Component type */ export declare type InheritedProps = WithoutUseProps>>; /** * Props of a component created with `use()` * @template T The type of the `use` prop */ export declare type UseProps = React.ClassAttributes & InheritedProps & { readonly use?: T | T[]; readonly useNext?: T | T[]; }; /** * Component created with `use()` * @template T Component type passed to `use(...components)` */ export declare type UseComponent = { (props: WithoutRef> & UseProps): React.ReactElement | null; uses: T[]; propTypes?: any; defaultProps?: any; displayName?: string; };