@vttforge/core / ForeignDocumentFieldInstance
Interface: ForeignDocumentFieldInstance<Doc, O>
A reference to another document, stored as its id.
What you read back depends on idOnly. With it, the id string. Without it, the document itself: the field resolves to a getter, so reading the property looks the document up in its collection and hands back the instance, or null when it is gone or lives in a compendium.
The field is nullable by default, so both shapes admit null.
Extends
Type Parameters
Doc
Doc extends DocumentClass = DocumentClass
O
O extends ForeignDocumentFieldOptions = ForeignDocumentFieldOptions
Properties
[BRAND]
readonly[BRAND]:"foreignDocument"
Overrides
model
readonlymodel:Doc
options
readonlyoptions:O