import type { JSX } from "react" import type { ComponentConfig } from './config' import type { IntrinsicElements } from './intrinsic' import type { PartialBy } from './utils' type InheritedCreator = { >>(props: D): (props: PartialBy) => N >>(extractor: (props: P) => D): (props: PartialBy) => N (extractor: (props: T & P) => Partial

, config: ComponentConfig): (props: T & P) => N >>(extractor: (props: T & P) => D, config: ComponentConfig): (props: PartialBy) => N } export type Inherited = { (component: (props: P) => N): InheritedCreator } & { readonly [N in keyof JSX.IntrinsicElements]: InheritedCreator } /** * ## Inherited * * Create an inherited component. */ export const inherited: Inherited