Skip to main content
Version: 5.3

LoadedReference <T>

Hierarchy

Index

Properties

$

$: Exclude<T, undefined | null>

Methods

get

  • get(): Exclude<T, undefined | null>
  • Returns Exclude<T, undefined | null>

getEntity

  • getEntity(): Exclude<T, undefined | null>
  • Returns Exclude<T, undefined | null>

getProperty

  • getProperty<K>(prop: K): Exclude<T, undefined | null>[K]
  • Type parameters

    • K: string | number | symbol

    Parameters

    • prop: K

    Returns Exclude<T, undefined | null>[K]

isInitialized

  • isInitialized(): boolean
  • Returns boolean

load

  • load<K, P>(options?: LoadReferenceOptions<Exclude<T, undefined | null>, P>): Promise<Exclude<T, undefined | null>>
  • load<K>(prop: K): Promise<Exclude<T, undefined | null>[K]>
  • Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns the entity.


    Type parameters

    • K: string | number | symbol = never
    • P: string = never

    Parameters

    Returns Promise<Exclude<T, undefined | null>>

populated

  • populated(populated?: boolean): void
  • Parameters

    • optionalpopulated: boolean

    Returns void

set

  • Parameters

    Returns void

toJSON

  • Parameters

    • rest...args: any[]

    Returns Dictionary<any>

unwrap

  • unwrap(): Exclude<T, undefined | null>
  • Returns Exclude<T, undefined | null>