import type { AnyComponentFactory } from './component.js'; /** * Creates a compound component by attaching sub-components as static properties. * * This enables the pattern of `Parent.Child` components (e.g., `Menu.Item`, `Card.Body`) * while preserving full TypeScript type inference for both the parent and children. * * @param main - The main/parent component factory * @param sub - An object containing sub-components to attach * @returns The main component with sub-components attached as static properties * * @example * ```tsx * // Define individual components * const _Menu = component(ctx => { ... }); * const _MenuItem = component(ctx => { ... }); * const _MenuTitle = component(ctx => { ... }); * * // Create compound component * export const Menu = compound(_Menu, { * Item: _MenuItem, * Title: _MenuTitle, * }); * * // Usage in JSX * * Navigation * Home * About * * ``` */ export declare function compound>(main: TMain, sub: TSub): TMain & TSub; //# sourceMappingURL=compound.d.ts.map