import { EffectFunction } from "../internals"; import { ComponentFunction, Props } from "./types"; declare class RenderRoot { contextStack: Map[]; cleanupStack: (() => void)[][]; currentCleanupFns: (() => void)[] | undefined; currentInstance: ComponentInstance | null; } export declare function effect(fn: EffectFunction): void; export declare function setContext(key: any, value: any): void; export declare function getContext(key: any): T; export declare function onMount(fn: () => void | (() => void)): void; /** @deprecated Use return value of onMount for clean up functions */ export declare function onUnmount(fn: () => void, activeRoot?: RenderRoot): void; export declare function h(tag: string | ComponentFunction, props: Props | null, ...children: any[]): Node; export declare function appendChild(parent: Node, child: any, activeRoot?: RenderRoot): void; type Disposer = () => void; declare class ComponentInstance { progenitor: ComponentFunction; parent: ComponentInstance | null; children: ComponentInstance[]; node: Node; protected contextMap?: Map; protected disposeFns?: Set; root: RenderRoot; constructor(parent: ComponentInstance | null); getContext(key: any): T; setContext(key: any, value: any): void; addDisposer(dispose: () => void): void; dispose(): void; static withNewChild(worker: (current: ComponentInstance) => T): T; } export declare function createComponent(component: ComponentFunction, props: any, children: any[]): { node: Node; dispose: () => void; }; export declare function render(component: ComponentFunction, container: HTMLElement): () => void; export {};