UNPKG

@tempots/dom

Version:

Fully-typed frontend framework alternative to React and Angular

13 lines (12 loc) 505 B
import { Renderable, TNode } from '../types/domain'; /** * Renders the given `node` into a DOM element selected by the provided `selector`. * Throws an error if the element cannot be found. * * @param selector - The CSS selector for the target DOM element. * @param node - The node to be rendered. * @param ctx - The DOM context. * @returns The result of rendering the `node` into the selected DOM element. * @public */ export declare const Portal: (selector: string, node: TNode) => Renderable;