@tempots/dom
Version:
Fully-typed frontend framework alternative to React and Angular
27 lines (26 loc) • 915 B
TypeScript
import { Signal } from '../std/signal';
import { Renderable, TNode } from '../types/domain';
import { ElementPosition } from '../std/element-position';
/**
* Options for configuring a conjunction.
* @public
*/
export type ConjunctionOptions = {
/**
* The separator to use for the last element.
*/
lastSeparator?: () => TNode;
/**
* The separator to use for the first element.
*/
firstSeparator?: () => TNode;
};
/**
* Creates a Renderable that returns the appropriate separator based on the element position.
*
* @param separator - The default separator to use.
* @param options - The options for configuring the conjunction.
* @returns A function that returns the appropriate separator based on the element position.
* @public
*/
export declare const Conjunction: (separator: () => TNode, options?: ConjunctionOptions) => (pos: Signal<ElementPosition>) => Renderable;