jsx-view
Version:
Minimal JSX for HTML DOM tightly integrated with RxJS. TypeScript definitions, and attributes can be assigned to observables.
27 lines • 1.22 kB
TypeScript
import type { Observable } from "rxjs";
import type { JSXDevInfo } from "./addJSXDev";
import type { DOMOutputSpec } from "./DOMOutputSpec";
declare global {
namespace JSX {
type Element = DOMSpecElement;
/** Child type for specifying functions that return a child element */
type Child = undefined | null | false | string | number | Node | JSX.Element | Observable<JSX.Child>;
interface ElementChildrenAttribute {
children: {};
}
}
}
declare const DOMSpecElementMarker: unique symbol;
export declare class DOMSpecElement {
readonly spec: DOMOutputSpec;
_dev?: JSXDevInfo;
constructor(spec: DOMOutputSpec);
[DOMSpecElementMarker]: boolean;
}
/** @internal */
export declare function __isDOMSpecElement(obj: any): obj is DOMSpecElement;
export declare function jsx(elemName: string | ((props: any) => JSX.Element), props: Record<string, any> | null): JSX.Element;
export declare function jsxCombineValues<T>(values: (JSX.Value<T> | undefined)[], merge: (values: (T | undefined)[]) => T): JSX.Value<T> | undefined;
export declare function flattenChildren(children: JSX.Children[]): JSX.Element[];
export {};
//# sourceMappingURL=jsxSpec.d.ts.map