UNPKG

rvx

Version:

A signal based rendering library

18 lines (17 loc) 590 B
import { Expression } from "../core/signals.js"; /** * Map an expression to join array elements using the specified separator. * * See {@link map}. * * @param separator The separator to use. Default is a space. * * @example * ```tsx * import { separated } from "rvx"; * * <div aria-owns={separated(["a", "b", ...])} /> * ``` */ export declare function separated(input: Expression<unknown[]>, separator?: string): Expression<string>; export declare function separated<T>(input: Expression<T>, separator?: string): Expression<T extends any[] ? (Exclude<T, any[]> | string) : T>;