dyna-record
    Preparing search index...

    Type Alias IntersectWithSK<T, Names, SK>

    IntersectWithSK: ExtractEntityFromSK<T, SK> extends infer SKNames
        ? ShouldNarrow<T, SKNames> extends true
            ? StrictNarrowByNames<T, Extract<Names, SKNames & string>>
            : NarrowByNames<T, Names>
        : NarrowByNames<T, Names>

    Intersects resolved entity names with SK-derived entity names. Since skCondition is a DynamoDB key condition that physically limits which items are scanned, it always constrains the result — it's not just a filter.

    • If SK narrows → intersect Names with SK entities. Empty intersection → never[].
    • If SK does not narrow → use Names alone via NarrowByNames.

    Type Parameters

    • T extends default
    • Names extends string
    • SK