UNPKG

edgerender

Version:
37 lines (36 loc) 1.38 kB
export declare type Props = Record<string, any>; export declare type Component = (props: Props) => JsxChunk | Promise<JsxChunk>; export declare class Fragment { } export declare type ElementType = string | typeof Fragment | Component; declare type ChildSingleType = string | boolean | number | RawHtml | JsxChunk; export declare type ChildType = ChildSingleType | ChildSingleType[]; export declare type Key = string | number | null; export declare type classNameType = string | (string | boolean | null | undefined)[] | Record<string, any>; export declare function render_jsx(jsx_element: JSX.Element): Promise<string>; interface CustomTagProperties { _tag: string; key?: Key; className?: classNameType; children?: ChildType; [key: string]: any; } export declare const CustomTag: ({ _tag, key, ...props }: CustomTagProperties) => JsxChunk; export declare class RawHtml { readonly html: string; constructor(html: string); } export declare const raw_html: (html: string) => string; export declare class JsxChunk { readonly el: ElementType; readonly key: Key; readonly args: Props; readonly props: Props; readonly children: ChildType[]; constructor(el: ElementType, key: Key | undefined, args: Props); render(): Promise<string>; private render_element; private render_children; toString(): string; } export {};