Skip to main content
Version: Next

Interface: LoadedReference<T, P>

core.LoadedReference

Type parameters#

NameType
TT: AnyEntity<T>
PP = never

Hierarchy#

Properties#

$

$: T & P

Defined in#

packages/core/src/typings.ts:430

Methods#

get#

get(): T & P

Returns#

T & P

Defined in#

packages/core/src/typings.ts:431


getEntity#

getEntity(): T

Returns#

T

Inherited from#

Reference.getEntity

Defined in#

packages/core/src/entity/Reference.ts:108


getProperty#

getProperty<K>(prop): T[K]

Type parameters#

NameType
KK: string | number | symbol

Parameters#

NameType
propK

Returns#

T[K]

Inherited from#

Reference.getProperty

Defined in#

packages/core/src/entity/Reference.ts:116


isInitialized#

isInitialized(): boolean

Returns#

boolean

Inherited from#

Reference.isInitialized

Defined in#

packages/core/src/entity/Reference.ts:120


load#

load(): Promise<T>

Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns the entity.

Returns#

Promise<T>

Inherited from#

Reference.load

Defined in#

packages/core/src/entity/Reference.ts:67

load<K>(prop): Promise<T[K]>

Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns the requested property instead of the whole entity.

Type parameters#

NameType
KK: string | number | symbol

Parameters#

NameType
propK

Returns#

Promise<T[K]>

Inherited from#

Reference.load

Defined in#

packages/core/src/entity/Reference.ts:73


populated#

populated(populated?): void

Parameters#

NameType
populated?boolean

Returns#

void

Inherited from#

Reference.populated

Defined in#

packages/core/src/entity/Reference.ts:124


set#

set(entity): void

Parameters#

NameType
entityT | IdentifiedReference<T, PrimaryProperty<T>>

Returns#

void

Inherited from#

Reference.set

Defined in#

packages/core/src/entity/Reference.ts:91


toJSON#

toJSON(...args): Dictionary<any>

Parameters#

NameType
...argsany[]

Returns#

Dictionary<any>

Inherited from#

Reference.toJSON

Defined in#

packages/core/src/entity/Reference.ts:128


unwrap#

unwrap(): T

Returns#

T

Inherited from#

Reference.unwrap

Defined in#

packages/core/src/entity/Reference.ts:104