reactronic-dom
Version:
Reactronic DOM - Transactional Reactive Front-End Development Framework
46 lines (45 loc) • 2.02 kB
TypeScript
import { Render, SuperRender, RxNodeType, RxNodeInstance, RxNode } from './RxDomV1.Types';
export declare class BasicNodeType<E, O> implements RxNodeType<E, O> {
readonly name: string;
readonly sequential: boolean;
constructor(name: string, sequential: boolean);
initialize(node: RxNode<E, O>): void;
render(node: RxNode<E, O>, args: unknown): void;
finalize(node: RxNode<E, O>, initiator: RxNode): void;
}
export declare class RxNodeInstanceImpl<E = unknown, O = void> implements RxNodeInstance<E, O> {
private static gUuid;
readonly uuid: number;
readonly level: number;
revision: number;
native?: E;
model?: unknown;
children: ReadonlyArray<RxNode>;
buffer: Array<RxNode> | undefined;
guests: ReadonlyArray<RxNode>;
resizeObserver?: ResizeObserver;
constructor(level: number);
rerender(node: RxNode<E, O>): void;
}
export declare class RxDom {
static readonly basic: BasicNodeType<any, any>;
static Root<T>(render: () => T): T;
static Node<E = unknown, O = void>(id: string, args: any, render: Render<E, O>, superRender?: SuperRender<E, O>, type?: RxNodeType<E, O>, inline?: boolean, creator?: RxNode, host?: RxNode): RxNode<E, O>;
static renderChildrenThenDo(action: () => void): void;
static usingAnotherHost<E>(host: RxNode<E>, run: (e: E) => void): void;
static createRootNode<E>(id: string, sequential: boolean, native: E): RxNode<E>;
static get self(): RxNode;
static currentNodeInstance<T>(): {
model?: T;
};
static currentNodeInstanceInternal<E>(): RxNodeInstanceImpl<E>;
static currentNodeRevision(): number;
static forAll<E>(action: (e: E) => void): void;
private static mergeAndRenderSequentialChildren;
private static mergeAndRenderChildren;
private static renderIncrementally;
private static mergeGuests;
private static forEachChildRecursively;
}
export declare function resolveReturn(value: any): any;
export declare function rejectRethrow(error: any): never;