import type { ComponentObject } from 'noodl-types'; import type { NuiComponentType } from '../types'; import Component from '../Component'; export interface PropsOptionFunc { (child: T): Partial; } export type PropsOptionObj = ComponentObject & { id?: string; }; interface Options { path?: string; props?: PropsOptionObj | PropsOptionFunc; } /** * A helper/utility to create Component instances corresponding to their NOODL * component type * @param { string | object | Component } component - NOODL component type, a component object, or a Component instance * @param { object | function | undefined } props = Component args passed to the constructor */ declare function createComponent(type: K, options?: Options): Component; declare function createComponent(value: PropsOptionObj, options?: Options): Component; declare function createComponent(component: Component, options?: Options): Component; export default createComponent;