UNPKG

@tempots/dom

Version:

Fully-typed frontend framework alternative to React and Angular

14 lines (13 loc) 802 B
import { ElementPosition } from '../std/element-position'; import { Value } from '../std/value'; import { TNode, Renderable } from '../types/domain'; /** * Creates a renderable function that repeats a given element a specified number of times. * * @param times - A signal representing the number of times the element should be repeated. * @param element - A function that returns the element to be repeated, based on the current index. * @param separator - (Optional) A function that returns the separator element to be inserted between repeated elements. * @returns A renderable function that renders the repeated elements. * @public */ export declare const Repeat: (times: Value<number>, element: (index: ElementPosition) => TNode, separator?: (pos: ElementPosition) => TNode) => Renderable;