import { VNode } from '../stencil-public-runtime'; import { JSXBase } from '../stencil-public-runtime'; /** A JSX `createElement` function passed to rendering functions. * You can use this to create markup outside of JSX environments * e.g. https://reactjs.org/docs/react-without-jsx.html */ interface HFunc { (tag: any): T; } interface HFunc { (tag: any, data: any): T; } interface HFunc { (tag: any, text: string): T; } interface HFunc { (sel: any, children: Array): T; } interface HFunc { (sel: any, data: any, text: string): T; } interface HFunc { (sel: any, data: any, children: Array): T; } interface HFunc { (sel: any, data: any, children: T): T; } type LibJSX = Record; type JSXRender = VNode | VNode[] | LibJSX | LibJSX[]; type TplReturn = JSXRender | string | Element | undefined; type TplResult = TplReturn | Promise; type DropFirst = T extends [any, ...infer U] ? U : never; export type CustomRenderer = (node: any, cell: HTMLElement | DocumentFragment) => void | Promise; export type TemplateFunc = (createElement: HFunc, props?: T) => TplResult; type TemplateCall = (...args: any) => TplResult; type WrapProps = { parentTag: string; attrs?: JSXBase.HTMLAttributes; template: T; args?: DropFirst>; }; /** * A functional component to handle custom rendering. * Usage: * @Prop() template = (_createElement: typeof h, exampleArg1: number, exampleArg2: boolean) => { if (exampleArg1) return this.handleClick(e), class: 'button-wrapper' }} * template={this.template} * args={[3, true]} * /> * * @param props - renderer template function, arguments to pass to the renderer function, parental wrapper tag (and attributes) * @param children - other virtual nodes to render * @returns a jsx vnode */ export declare function CustomRender(props: WrapProps, children?: any): VNode; export {};