Type Alias RelationshipEntities<T>

RelationshipEntities: {
    [K in RelationshipProperties<T>]: NonNullable<T[K]> extends (infer U)[]
        ? AssertDynaRecord<U>
        : AssertDynaRecord<NonNullable<T[K]>>
}[RelationshipProperties<T>]

Maps the relationship properties of a DynaRecord type T to their corresponding entity types.

For array relationships, this resolves to the entity type of the array elements. For single relationships, this resolves to the entity type of the property.

Type Parameters

  • T extends default

    The DynaRecord type to evaluate.

A union of all entity types referenced by the relationships in T.