Target object DXN.
Returns true if the reference has a target available (inlined or resolver set).
The reference target.
May return undefined if the object is not loaded in the working set.
Accessing this property, even if it returns undefined will trigger the object to be loaded to the working set.
Serializes the reference to a JSON object. The serialization format is compatible with the IPLD-style encoded references. When a reference has a saved target (i.e. the target or object holding the reference is not in the database), the target is included in the serialized object.
Examples:
{ "/": "dxn:..." }
{ "/": "dxn:...", "target": { ... } }
Promise that will resolves with the target object. Will load the object from disk if it is not present in the working set.
Subscribe to the ref's resolution event. The callback fires when the target object becomes available in the working set (e.g. when its document is loaded after sibling-client mutation). Note: the resolver only schedules a notification when the target is requested via target while it is not yet loaded.
Function that unsubscribes the callback.
Promise that will resolves with the target object or undefined if the object is not loaded locally.
Represents materialized reference to a target. This is the data type for the fields marked as ref.