effex-monorepo
    Preparing search index...

    Type Alias ChildInput<E, R>

    ChildInput: ChildLeaf<E, R> | ReadonlyArray<ChildLeaf<E, R>>

    A child input accepted by element builders ($.div, $.span, ...) and component authors who want to opt in to the same API.

    A ChildInput is either a leaf or a single-level array of leaves. Nested arrays ([[a, b], [c]]) are intentionally not part of the type — the runtime does not walk deeper than one level either. Use .flat() or the variadic form if you're combining multiple lists.

    The single-level constraint is what makes E/R inference through component wrappers tractable — a self-recursive array branch collides with ChildInputE/ChildInputR's array recursion and produces TS2589 ("excessively deep") whenever a wrapper forwards its own generic children to a primitive.

    Type Parameters

    • E = never
    • R = never