Type Alias IntersectTypeWithOr<T, F>

IntersectTypeWithOr: ResolveOrBlockEntityNames<T, F> extends infer OrNames
    ? ShouldNarrow<T, OrNames> extends true
        ? StrictNarrowByNames<
            T,
            Extract<ExtractTypeFromFilter<F> & string, OrNames & string>,
        >
        : NarrowedQueryResults<T, F>
    : NarrowedQueryResults<T, F>

When a top-level type filter narrows, also checks if $or blocks narrow to a disjoint set. Since DynamoDB ANDs them, the result is the intersection.

Type Parameters