Skip to content

ReadOneRelationInstance

Navigates a Relation from a side that holds at most one target.

Relate items

  • BaseRelationInstance<TItem>

TItem extends ReadItem

The type of the target Item.

readonly type: "one"

Discriminates this side as holding at most one target.

get(): Promise<RelatedItem<TItem> | undefined>

Loads the current target of this Relation.

Promise<RelatedItem<TItem> | undefined>

The target with its Relation metadata, or undefined when no target is set or the target is not readable by the active principal.


isType(item): item is TItem

Reports whether an Item may be a target on this side of the Relation: its Template is the target Template or a member of the target Union.

BaseReadItem

The Item to test.

item is TItem

BaseRelationInstance.isType