UNPKG

tsbase

Version:

Base class libraries for TypeScript

23 lines (22 loc) 879 B
type OptionalDocument = Document | null; type JsxFunc = ((attributes: Jsx['attributes'], children: Jsx['children']) => Jsx); type ClassComponent = { new (): { render: JsxFunc; }; }; export type Jsx = { attributes?: Record<string, string | number | boolean | undefined | null | ((event: Event | null) => void)> | null; children?: (Jsx | string)[]; nodeName: string | JsxFunc | ClassComponent; }; export declare const Fragment = "fragment"; export declare function ParseJsx(nodeName: string | JsxFunc, attributes?: Jsx['attributes'], ...children: (Jsx | string)[]): Jsx; export declare class JsxRenderer { private constructor(); static RenderJsx(jsx: Jsx, documentRef?: OptionalDocument, globalAttributes?: {}): string; private static addElementEventListener; private static transformJsxToHtml; private static sanitize; } export {};