Options
All
  • Public
  • Public/Protected
  • All
Menu

Lazy initialization

Type parameters

  • T

Hierarchy

  • Lazy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Lazy<T>(init: () => T): Lazy<T>
  • Type parameters

    • T

    Parameters

    • init: () => T
        • (): T
        • Returns T

    Returns Lazy<T>

Properties

val

val: Voidable<T>

Methods

get

  • get(): T
  • Get the value, if not initialized, the initialization function will be called

    Returns T

got

  • got(): boolean
  • Return is already initialized

    Returns boolean

reget

  • reget(): T

Generated using TypeDoc