Skip to main content
Version: 5.2

Reference <T>

Hierarchy

Index

Constructors

constructor

Methods

getEntity

  • getEntity(): T
  • Returns T

getProperty

  • getProperty<K>(prop: K): T[K]
  • Type parameters

    • K: string | number | symbol

    Parameters

    • prop: K

    Returns T[K]

isInitialized

  • isInitialized(): boolean
  • Returns boolean

load

  • 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<T>

populated

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

    • optionalpopulated: boolean

    Returns void

set

toJSON

  • Parameters

    • rest...args: any[]

    Returns Dictionary<any>

unwrap

  • unwrap(): T
  • Returns T

staticcreate

staticcreateFromPK

staticcreateNakedFromPK

staticisReference

  • isReference<T>(data: any): data is Reference<T>
  • Checks whether the argument is instance of Reference wrapper.


    Type parameters

    Parameters

    • data: any

    Returns data is Reference<T>

staticunwrapReference

  • Returns wrapped entity.


    Type parameters

    • T

    Parameters

    Returns T

staticwrapReference