Skip to main content
Version: 4.4

Interface: LoadedReference<T, P>#

core.LoadedReference

Type parameters#

NameTypeDefault
TAnyEntity<T>-
P-never

Hierarchy#

Properties#

$

$: T & P

Defined in: packages/core/src/typings.ts:379

Methods#

get#

get(): T & P

Returns: T & P

Defined in: packages/core/src/typings.ts:380


getEntity#

getEntity(): T

Returns: T

Inherited from: Reference

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


getProperty#

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

Type parameters:#

NameType
Kstring | number | symbol

Parameters:#

NameType
propK

Returns: T[K]

Inherited from: Reference

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


isInitialized#

isInitialized(): boolean

Returns: boolean

Inherited from: Reference

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

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

load<K>(prop: K): 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
Kstring | number | symbol

Parameters:#

NameType
propK

Returns: Promise<T[K]>

Inherited from: Reference

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


populated#

populated(populated?: boolean): void

Parameters:#

NameType
populated?boolean

Returns: void

Inherited from: Reference

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


set#

set(entity: T | IdentifiedReference<T, PrimaryProperty<T>>): void

Parameters:#

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

Returns: void

Inherited from: Reference

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


toJSON#

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

Parameters:#

NameType
...argsany[]

Returns: Dictionary<any>

Inherited from: Reference

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


unwrap#

unwrap(): T

Returns: T

Inherited from: Reference

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

Last updated on by renovate[bot]