AccessIndexedFieldWithValue
AccessIndexedFieldWithValue<
S,V> ={ [F in AccessIndexedFieldFor<S>]: NonNullable<AccessFieldValueFor<S, F>> extends readonly (infer E)[] ? [V] extends [E] ? F : never : [V] extends [NonNullable<AccessFieldValueFor<S, F>>] ? F : never }[AccessIndexedFieldFor<S>]
Defined in: packages/core/src/access/types.ts:432
Indexed fields on S whose stored value admits V.
Narrows a value-specific helper — a “published only” read, say — to the fields that
can actually hold that value, so naming the wrong field is a compile error rather
than a comparison that silently matches nothing. Handles both a scalar field and an
array-valued one (select and relationship fields store arrays).
Type Parameters
Section titled “Type Parameters”S extends string
Resource slug.
V
The value the field must be able to hold.