effex-monorepo
    Preparing search index...

    Interface ReconcileConfig<A, E, R>

    Configuration for the reconcile function.

    interface ReconcileConfig<A, E = never, R = never> {
        container?: () => Element<unknown, E, R>;
        getItemForKey?: (key: string, value: A) => unknown;
        getTargetKeys: (value: A) => readonly string[];
        ordered?: boolean;
        renderSlot: (
            key: string,
            value: A,
            ctx: { index: Signal.Signal<number>; item: Signal.Signal<unknown> },
        ) => Element<unknown, E, R>;
    }

    Type Parameters

    • A

      The type of the reactive value

    • E = never

      Error type

    • R = never

      Requirements type

    Index

    Properties

    container?: () => Element<unknown, E, R>

    Optional custom container factory

    getItemForKey?: (key: string, value: A) => unknown

    Get the item value for a given key (used by each)

    getTargetKeys: (value: A) => readonly string[]

    Derive target slot keys from the current value

    ordered?: boolean

    Whether slot order matters (true for each)

    renderSlot: (
        key: string,
        value: A,
        ctx: { index: Signal.Signal<number>; item: Signal.Signal<unknown> },
    ) => Element<unknown, E, R>

    Render a slot given its key and the current value