UNPKG

@tempots/dom

Version:

Fully-typed frontend framework alternative to React and Angular

21 lines (20 loc) 956 B
import { Renderable, TNode } from '../types/domain'; import { Value } from '../std/value'; /** * Lazily renders content based on a boolean condition. * @param condition - The condition to evaluate * @param then - Function returning content to render if condition is true * @param otherwise - Optional function returning content to render if condition is false * @returns Renderable content * @public */ export declare const When: (condition: Value<boolean>, then: () => TNode, otherwise?: () => TNode) => Renderable; /** * Lazily renders content when a condition is false. * @param condition - The condition to evaluate * @param then - Function returning content to render if condition is false * @param otherwise - Optional function returning content to render if condition is true * @returns Renderable content * @public */ export declare const Unless: (condition: Value<boolean>, then: () => TNode, otherwise?: () => TNode) => Renderable;