UNPKG

@teaui/react

Version:

React Reconciler and renderer for TeaUI

16 lines (15 loc) 748 B
import React from 'react'; import type { ReactNode } from 'react'; import { Screen, type ScreenOptions, Window } from '@teaui/core'; type ViewFactory = (props: any) => any; /** * Register a custom element type for the React reconciler. * External packages (e.g. @teaui/subprocess) can call this to add new JSX elements. * * @example * registerElement('tui-subprocess', (props) => new SubprocessView(props)) */ export declare function registerElement(type: string, factory: ViewFactory): void; export declare function render(screen: Screen, window: Window, rootNode: ReactNode): () => void; export declare function run(component: ReactNode, options?: Partial<ScreenOptions>): Promise<[Screen, Window, React.ReactNode, () => void]>; export {};