Type Alias ShouldNarrow<T, Names>

ShouldNarrow: IsAny<Names> extends true
    ? false
    : [Names] extends [never]
        ? false
        : [Names] extends [string]
            ? [PartitionEntityNames<T>] extends [Names] ? false : true
            : false

Determines whether Names represents a meaningful narrowing of the partition. Returns true if Names is a specific subset of partition entity names, false otherwise.

A narrowing is meaningful when Names is:

  • Not any (from AWS SDK's NativeAttributeValue propagation)
  • Not never (no resolution)
  • Not the full partition union (no narrowing effect)

This guard is shared across the inference chain to avoid duplicating the three-check pattern (IsAny / never / full-union) at each fallback level.

Type Parameters

  • T extends default

    The root entity being queried.

  • Names

    The resolved entity name union to check.