effex-monorepo
    Preparing search index...

    Type Alias Children<E, R>

    Children: ReadonlyArray<ChildLeaf<E, R>>

    Variadic-rest type for wrappers that need to interleave their own elements with forwarded children:

    const Section = <E = never, R = never>(
    props: { heading: string },
    ...children: Children<E, R>
    ): Element<HTMLElement, E, R> =>
    $.section({}, $.h2({}, props.heading), children);

    Uses ChildLeaf under the hood — no array-as-single-arg from the caller, but the collected array fits $.section's ChildInput slot as one unit, so the wrapper can pass it alongside its own owned children in the same primitive call. Callers spread arrays: Section(props, ...myArray).

    This is the recommended default for wrapper variadic children.

    Type Parameters

    • E = never
    • R = never